Need explaination for `date` command !

Jonathan Horne freebsd at dfwlp.com
Sat Dec 16 08:26:59 PST 2006


On Saturday 16 December 2006 06:18, Supote Leelasuppakorn wrote:
> Hi lists,
>
>    I am currently using FreeBSD-6.1 for a while. I am in Thailand so
> my time zone is GMT+7. Let say the time is 3:00 PM in Thailand.
> What I would like to know is
>
> 1. What is the output of `date` command I should get ?
> 2. What is the output of `date -u` command I should get ?
>
> TIA
>
>
> ------------------------------------
>     Pote  :-)
> ------------------------------------
>

well, mine outputs like this:

[jhorne at athena ~]$ date
Sat Dec 16 10:23:44 CST 2006
[jhorne at athena ~]$ date -u
Sat Dec 16 16:23:46 UTC 2006

(i am GMT-6, US Central Time).  as you can see, the second run with the -u, 
added my 6 hours back on again.  so, if you are GMT+7, i would assume that 
when you give the -u, you would show a time 7 hours earlier.

hth,
jonathan


More information about the freebsd-questions mailing list