Mercurial > pidgin
comparison src/util.c @ 10876:4fdc8a1102c0
[gaim-migrate @ 12567]
ditto for head
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Tue, 26 Apr 2005 22:27:49 +0000 |
| parents | 6240d7fd5b2c |
| children | acaf64c659b9 |
comparison
equal
deleted
inserted
replaced
| 10875:a118e50116df | 10876:4fdc8a1102c0 |
|---|---|
| 551 tzoff = tzhrs*60*60 + tzmins*60; | 551 tzoff = tzhrs*60*60 + tzmins*60; |
| 552 if (*c == '+') | 552 if (*c == '+') |
| 553 tzoff *= -1; | 553 tzoff *= -1; |
| 554 } | 554 } |
| 555 | 555 |
| 556 t->tm_isdst = -1; | |
| 557 | |
| 556 if (tzoff || utc) { | 558 if (tzoff || utc) { |
| 557 #ifdef HAVE_TM_GMTOFF | 559 #ifdef HAVE_TM_GMTOFF |
| 558 tzoff += t->tm_gmtoff; | 560 tzoff += t->tm_gmtoff; |
| 559 #else | 561 #else |
| 560 # ifdef HAVE_TIMEZONE | 562 # ifdef HAVE_TIMEZONE |
| 561 tzset(); /* making sure */ | 563 tzset(); /* making sure */ |
| 562 tzoff -= timezone; | 564 tzoff -= timezone; |
| 565 t->tm_isdst = 0; /* I think this might fix it */ | |
| 563 # endif | 566 # endif |
| 564 #endif | 567 #endif |
| 565 } | 568 } |
| 566 } | 569 } |
| 567 } | 570 } |
| 568 | 571 |
| 569 t->tm_isdst = -1; | |
| 570 retval = mktime(t); | 572 retval = mktime(t); |
| 571 retval += tzoff; | 573 retval += tzoff; |
| 572 | 574 |
| 573 return retval; | 575 return retval; |
| 574 } | 576 } |
