Oct 31, 2003 #1 pjb Programmer May 1, 2001 148 US Is there a way to retrieve the current time from the date command for a different time zone?
Oct 31, 2003 #2 jad Programmer Apr 7, 1999 1,195 GB just set the TZ variable: in csh: setenv TZ gb in [k]sh: TZ=gb export TZ then run 'date' Upvote 0 Downvote
Oct 31, 2003 Thread starter #3 pjb Programmer May 1, 2001 148 US Thanks, Do you happen to know what the vaues are for eastern and central? Upvote 0 Downvote
Oct 31, 2003 #4 PHV MIS Nov 8, 2002 53,708 FR For Eastern Standard Time do: Code: TZ=EST5 date The syntax (simplified) for TZ is 3 letters followed by the number of hours past GMT. Hope This Help PH. Upvote 0 Downvote
For Eastern Standard Time do: Code: TZ=EST5 date The syntax (simplified) for TZ is 3 letters followed by the number of hours past GMT. Hope This Help PH.
Oct 31, 2003 Thread starter #5 pjb Programmer May 1, 2001 148 US Thanks, Looks like even one letter will work. This gives me eastern time also: TZ=x5 date '+%r' Upvote 0 Downvote