AW: [En-Nut-Discussion] Setting Local Time Zone

Oliver Schulz Oliver.Schulz at bong.de
Thu Apr 15 09:51:40 CEST 2004


Hi Dusan,

well I tried to adopt to the standarc c library with these time functions. Since in standard c is no function to set the value of _timezone, I didn't write one.

In fact, it is described to manipulate _timezone directly, which is not very complicated I think.

BTW, your suggestion does not work for odd timezones like for New Foundland, Teheran, Kabul, Calcutta, Kathmandu, Rangoon and of course Adelaide!

Regards,
Oliver.

> -----Ursprüngliche Nachricht-----
> Von: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de]Im Auftrag von 
> Dusan Ferbas
> Gesendet: Donnerstag, 15. April 2004 09:27
> An: en-nut-discussion at egnite.de
> Betreff: [En-Nut-Discussion] Setting Local Time Zone
> 
> 
> Hi Oliver Schulz,
> 
> we are using SNTP now. And there was a need for setting time 
> zone. We did 
> not find a way how to do that.
> 
> You fixed _timezone to EST = -05:00:00 . Instead of rewriting 
> this variable 
> directly I suggest to add following function into 
> crt/tzset.c. Also fn 
> definition is expected to be added into include/tzset.h
> 
> >void set_time_zone(int time_offset)
> >{
> >         _timezone = (long)time_offset * 60L * 60L;
> >}
> 
> 
> Dusan  
> 
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> 



More information about the En-Nut-Discussion mailing list