Overview
| Artifact ID: | ec51219ac54e853c54705f71bf0dadb7f110c974 |
|---|---|
| Ticket: | 940278ffffffffffffffffffffffffffffffffff
env(TZ) has delayed effect on clock format |
| User & Date: | davidw on 2004-04-23 03:44:02 |
Changes
- icomment:
Logged In: YES user_id=240 This works on my system (linux, modern kernel, modern glibc): #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { time_t thetime = 0; struct tm *tms; time(&thetime); setenv("TZ", "GMT-1", 1); tms = localtime(&thetime); printf("padova hour %d\n", tms->tm_hour); setenv("TZ", "GMT+8", 1); tms = localtime(&thetime); printf("eugene hour %d\n", tms->tm_hour); } - login: "davidw"
- mimetype: "text/plain"
- username: "davidw"