| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sfldate.h" char * timezone_string (void)
Returns a static string containing the time zone as a 4-digit number, with a leading '+' or '-' character. GMT is represented as "+0000"; Central European Time is "+1000". If the system does not support the timezone, returns "+0000".
{ #if (defined (TIMEZONE)) static char formatted_string [10]; /* -nnnn plus null */ int minutes; /* TIMEZONE is in seconds */ minutes = 0 - (int) (TIMEZONE / 60); snprintf (formatted_string, sizeof (formatted_string), "%03d%02d", minutes / 60, abs (minutes % 60)); if (*formatted_string == '0') *formatted_string = '+'; return (formatted_string); #else return ("+0000"); #endif }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |