Subject: gmt offset
To: None <tech-userlevel@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 01/09/2001 14:31:09
is there a standardized way to determine one's offset from gmt for a
given timezone?  or do i have to do it this way?

#include <time.h>
main() {
  struct tm tm;
  time_t now, gmt;
  time(&now);
  tm = *gmtime(&now);
  gmt = mktime(&tm);
  printf("now %d gmt %d diff %d\n", now, gmt, now - gmt);
}

and hmm...i wonder who would have to be poked in order to get the %z
format for strftime() ratified?

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."