Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert local time string to UTC

Status
Not open for further replies.

madasafish

Technical User
Jul 18, 2006
78
TH
I am using gawk version 4.0.0 and reading a file that has local time strings in two of the CSV fields and would like to convert these strings to UTC time strings.
This is a monthly exercise and local time will automatically change depending on the time of the year.

Code:
$ date
Sat Apr  6 09:55:30 BST 2013


$INFILE with local time strings
Code:
05:30:00,22:00:00
19:00:00,07:00:00
19:00:00,06:00:00

As always, thanks in advance.

Madasafish
 
I forgot to mention the converted UTC Time strings should be in the same format as the local time strings supplied.
Many thanks,
Madasafish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top