comparison src/util.c @ 9725:242a5a97c952

[gaim-migrate @ 10586] Fix an indentation oopsie. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 08 Aug 2004 17:37:56 +0000
parents 25866d09063d
children 8d891252f2ac
comparison
equal deleted inserted replaced
9724:6b5bd8ee11db 9725:242a5a97c952
534 534
535 /* 2 digit day */ 535 /* 2 digit day */
536 if (!sscanf(c, "%02d", &t->tm_mday)) return 0; 536 if (!sscanf(c, "%02d", &t->tm_mday)) return 0;
537 c += 2; 537 c += 2;
538 if (*c == 'T' || *c == '.') { /* we have more than a date, keep going */ 538 if (*c == 'T' || *c == '.') { /* we have more than a date, keep going */
539 c++; /* skip the "T" */ 539 c++; /* skip the "T" */
540 540
541 /* 2 digit hour */ 541 /* 2 digit hour */
542 if (sscanf(c, "%02d:%02d:%02d", &t->tm_hour, &t->tm_min, &t->tm_sec) == 3 || 542 if (sscanf(c, "%02d:%02d:%02d", &t->tm_hour, &t->tm_min, &t->tm_sec) == 3 ||
543 sscanf(c, "%02d%02d%02d", &t->tm_hour, &t->tm_min, &t->tm_sec) == 3) { 543 sscanf(c, "%02d%02d%02d", &t->tm_hour, &t->tm_min, &t->tm_sec) == 3) {
544 int tzhrs, tzmins; 544 int tzhrs, tzmins;
545 c += 8; 545 c += 8;
546 if (*c == '.') /* dealing with precision we don't care about */ 546 if (*c == '.') /* dealing with precision we don't care about */
547 c += 4; 547 c += 4;
548 if ((*c == '+' || *c == '-') && 548 if ((*c == '+' || *c == '-') &&
549 sscanf(c+1, "%02d:%02d", &tzhrs, &tzmins)) { 549 sscanf(c+1, "%02d:%02d", &tzhrs, &tzmins)) {
550 tzoff = tzhrs*60*60 + tzmins*60; 550 tzoff = tzhrs*60*60 + tzmins*60;
551 if (*c == '+') 551 if (*c == '+')
552 tzoff *= -1; 552 tzoff *= -1;
553 } 553 }
554 554
555 if (tzoff || utc) { 555 if (tzoff || utc) {
556 #ifdef HAVE_TM_GMTOFF 556 #ifdef HAVE_TM_GMTOFF
557 tzoff += t->tm_gmtoff; 557 tzoff += t->tm_gmtoff;