I have a simple gnuplot command file:
....
set xdata time
set timefmt "%s"
set format x "%H:%M"
....
where x - timestamp column.
Result - time in UTC format. Can I change local timezome for x axis ?
Just came across this in the docs today:
The conversion to and from seconds assumes Universal Time (which is the same as Greenwich Standard Time). There is no provision for changing the time zone or for daylight savings. If all your data refer to the same time zone (and are all either daylight or standard) you don't need to worry about these things. But if the absolute time is crucial for your application, you'll need to convert to UT yourself.
From help time/date
I just ran across this today. You don't need to change the format, just change the data. If data.txt contains timestamps in UTC, and you want to display them in PDT (-7 hours off from UTC), simply use:
plot 'data.txt' using ($1+(-7*3600)):2
This subtracts 7 hours (in seconds) from each x value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With