Hi,<br>Here is my environment:<br>ti@~: uname -a<br>FreeBSD  7.0-RELEASE FreeBSD 7.0-RELEASE #0: Tue Apr  8 07:57:43 ICT 2008     ti@HP-PAVILLION:/usr/obj/usr/src/sys/EXTCOMPAT  i386<br><br>1> os:getenv("TZ").<br>
"Asia/Saigon"<br>7> DateTime = {{2008,5,5},{1,1,1}}.                             <br>{{2008,5,5},{1,1,1}}<br>9> calendar:local_time_to_universal_time_dst(DateTime).           <br>** exception error: bad argument<br>
     in function  erlang:universaltime_to_localtime/1<br>        called as erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}})<br>     in call from calendar:local_time_to_universal_time_dst/1<br><br>10> erlang:localtime_to_universaltime(DateTime, true).<br>
{{1969,12,31},{23,59,59}}<br><br>11> erlang:localtime_to_universaltime(DateTime, false).<br>{{2008,5,4},{18,1,1}}<br><br>And below is the result of zdump command on /etc/localtime file:<br>ti@~: zdump -v /etc/localtime<br>
/etc/localtime  Fri Dec 13 20:45:52 1901 UTC = Sat Dec 14 03:52:32 1901 LMT isdst=0 gmtoff=25600<br>/etc/localtime  Sat Dec 14 20:45:52 1901 UTC = Sun Dec 15 03:52:32 1901 LMT isdst=0 gmtoff=25600<br>/etc/localtime  Fri Jun  8 16:53:19 1906 UTC = Fri Jun  8 23:59:59 1906 LMT isdst=0 gmtoff=25600<br>
/etc/localtime  Fri Jun  8 16:53:20 1906 UTC = Fri Jun  8 23:59:40 1906 SMT isdst=0 gmtoff=25580<br>/etc/localtime  Fri Mar 10 16:54:39 1911 UTC = Sat Mar 11 00:00:59 1911 SMT isdst=0 gmtoff=25580<br>/etc/localtime  Fri Mar 10 16:54:40 1911 UTC = Fri Mar 10 23:54:40 1911 ICT isdst=0 gmtoff=25200<br>
/etc/localtime  Tue Apr 30 16:59:59 1912 UTC = Tue Apr 30 23:59:59 1912 ICT isdst=0 gmtoff=25200<br>/etc/localtime  Tue Apr 30 17:00:00 1912 UTC = Wed May  1 01:00:00 1912 ICT isdst=0 gmtoff=28800<br>/etc/localtime  Thu Apr 30 15:59:59 1931 UTC = Thu Apr 30 23:59:59 1931 ICT isdst=0 gmtoff=28800<br>
/etc/localtime  Thu Apr 30 16:00:00 1931 UTC = Thu Apr 30 23:00:00 1931 ICT isdst=0 gmtoff=25200<br>/etc/localtime  Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 10:14:07 2038 ICT isdst=0 gmtoff=25200<br>/etc/localtime  Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 10:14:07 2038 ICT isdst=0 gmtoff=25200<br>
ti@~: <br><br>It worked great  before i change the time zone.<br><br>Regards,<br>Tien <br>   <br><br><br>