tags:

views:

49

answers:

2

Why for certain linux shell the datetime is Tue Feb 24 13:03:40 SGT 2009 why some is Tuesday, February 24, 2009 1:03:41 PM SGT

Is the SYSDATE SQL Statement really deriving the date/time from the server linux date command?

Thanks

A: 

Is the TZ environment variable set in one of the shells? The TZ variable can be used to set the timezone for the shell, e.g., see here.

David Norman
+1  A: 

It's not entirely clear to me what you are asking. Are you asking why the format is different from one Linux machine to the next? If that is the case, the only reason I can think of that you would care is because you have some app that is parsing the output of the command. In that case you should specify precisely the format that you would like, and it won't matter what the local system settings are.

The format of the first date you posted is "%a %b %d %H:%M:%S %Z %Y"

You can find the options in the date command man pages.

Kip