| | |
date command
Thread Solved |
•
•
Join Date: Feb 2006
Posts: 399
Reputation:
Solved Threads: 14
HI Guys,
Prob a very simple one but im stumped, I run the following command and get:
But when I run
My question is why is the second command an hour behind? In my environment the following are set:
I have tried it on a different server with exactly the same commands and env variables and get the correct result, what am I doing wrong here?
Prob a very simple one but im stumped, I run the following command and get:
Shell Scripting Syntax (Toggle Plain Text)
date Wednesday, 19 August 2009 09:20:59 BST
Shell Scripting Syntax (Toggle Plain Text)
date -u '+%y%m%d.%H:%M:%S' 090819.08:21:27
My question is why is the second command an hour behind? In my environment the following are set:
Shell Scripting Syntax (Toggle Plain Text)
LC_TIME=en_GB.ISO8859-15 TZ=GB
If my post helped add to my rep!
Please see this site:
http://wwp.greenwichmeantime.com/
It doesn't make sense to me either but it seems like that is probably a law in GB.
http://wwp.greenwichmeantime.com/
It doesn't make sense to me either but it seems like that is probably a law in GB.
•
•
Join Date: Feb 2006
Posts: 399
Reputation:
Solved Threads: 14
I have worked it out have used:
Instead of date -u
Shell Scripting Syntax (Toggle Plain Text)
`date +"%Y.%m.%d.%H%M"`
If my post helped add to my rep!
Actually, the below command gives the time as per GMT :
where as on using , we get the time according to what we have set our time zone (TZ) as.
Shell Scripting Syntax (Toggle Plain Text)
date -u
where as on using
Shell Scripting Syntax (Toggle Plain Text)
date
Learn to appreciate and appreciate to learn.
![]() |
Similar Threads
- Data Report in vb 6.0 (Visual Basic 4 / 5 / 6)
- How to format this date UNDER FreeBSD? (Shell Scripting)
- What's the code of making the day and date automatically updated (PHP)
- Shell Script for yesterday's date. (Shell Scripting)
- Korn Shell Script for deleting files older than 2 months (Shell Scripting)
- structure (C)
- Virus Of Death - Help Needed! (Viruses, Spyware and other Nasties)
- insert datetime into the database (C#)
- editing the appearance of entries in a guestbook (HTML and CSS)
Other Threads in the Shell Scripting Forum
- Previous Thread: Issue with sed and date variable - Suffix too large - 512 max
- Next Thread: script to run java program
| Thread Tools | Search this Thread |






