equal
deleted
inserted
replaced
478 * found. Otherwise, NULL is returned. Solaris libc looks up |
478 * found. Otherwise, NULL is returned. Solaris libc looks up |
479 * "/etc/default/init" to get the default TZ value if TZ is not defined |
479 * "/etc/default/init" to get the default TZ value if TZ is not defined |
480 * as an environment variable. |
480 * as an environment variable. |
481 */ |
481 */ |
482 static char * |
482 static char * |
483 getPlatformTimeZoneID() |
483 getPlatformTimeZoneID(void) |
484 { |
484 { |
485 char *tz = NULL; |
485 char *tz = NULL; |
486 FILE *fp; |
486 FILE *fp; |
487 |
487 |
488 /* |
488 /* |
575 * Returns a zone ID of Solaris when the TZ value is "localtime". |
575 * Returns a zone ID of Solaris when the TZ value is "localtime". |
576 * First, it tries scf. If scf fails, it looks for the same file as |
576 * First, it tries scf. If scf fails, it looks for the same file as |
577 * /usr/share/lib/zoneinfo/localtime under /usr/share/lib/zoneinfo/. |
577 * /usr/share/lib/zoneinfo/localtime under /usr/share/lib/zoneinfo/. |
578 */ |
578 */ |
579 static char * |
579 static char * |
580 getSolarisDefaultZoneID() { |
580 getSolarisDefaultZoneID(void) { |
581 char *tz = NULL; |
581 char *tz = NULL; |
582 struct stat statbuf; |
582 struct stat statbuf; |
583 size_t size; |
583 size_t size; |
584 char *buf; |
584 char *buf; |
585 int fd; |
585 int fd; |
874 } |
874 } |
875 |
875 |
876 #else |
876 #else |
877 |
877 |
878 char * |
878 char * |
879 getGMTOffsetID() |
879 getGMTOffsetID(void) |
880 { |
880 { |
881 time_t offset; |
881 time_t offset; |
882 char sign, buf[32]; |
882 char sign, buf[32]; |
883 #if defined(__solaris__) |
883 #if defined(__solaris__) |
884 struct tm localtm; |
884 struct tm localtm; |