| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 1.91

 

timezone_string

#include "sfldate.h"
char *
timezone_string (void)

Synopsis

Returns a static string containing the time zone as a 4-digit number, optionally with a leading '-' character. GMT is represented as "0000"; Central European Time is "1000". If the system does not support the timezone, returns "0000".

Source Code - (sfldate.c)

{
    static char
        formatted_string [6];           /*  -nnnn plus null                  */
    int
        minutes;                        /*  TIMEZONE is in seconds           */

    minutes = (int) (TIMEZONE / 60);
    sprintf (formatted_string, "%02d%02d", 0 - minutes / 60, minutes % 60);
    return  (formatted_string);
}

| << | < | > | >> iMatix Copyright © 1996-98 iMatix