Difference between revisions of "Converting timezone using date command"
From Notes_Wiki
m |
m |
||
Line 17: | Line 17: | ||
Steps learned from http://www.linuxhowtos.org/Tips%20and%20Tricks/timzone_conversion.htm | Steps learned from http://www.linuxhowtos.org/Tips%20and%20Tricks/timzone_conversion.htm | ||
<yambe:breadcrumb>Desktop_tips_and_tricks|Desktop tips and tricks</yambe:breadcrumb> |
Revision as of 07:48, 27 August 2018
<yambe:breadcrumb>Desktop_tips_and_tricks|Desktop tips and tricks</yambe:breadcrumb>
Converting timezone using date command
To convert time of other timezone to local time one can use:
date -d '09:30 PDT' Fri Jul 19 22:00:00 IST 2013
Similarly to convert localtime to other timezone we can use:
TZ='America/Los_Angeles' date -d '09:30 IST' Thu Jul 18 21:00:00 PDT 2013
Files under /usr/share/zoneinfo can be seen to learn other possible values for TZ
Steps learned from http://www.linuxhowtos.org/Tips%20and%20Tricks/timzone_conversion.htm
<yambe:breadcrumb>Desktop_tips_and_tricks|Desktop tips and tricks</yambe:breadcrumb>