Odd timezone related behaviour
By default WinSCP was set to MLSD Auto.
I believe the PLC time is in UTC - unless the timezone / offset is specified.
I am pretty sure that results in file timestamps written in UTC
SO...
The filestamps on the files when examined on the SDcard in Windoze are "correct"
(PLC thinks it is in UTC but is in local time)
When I look at the timestamps displayed by WinSCP, they are all 7 hours earlier
Theoretically the autodetect should take care of it BUT
when I set MLSD to OFF and turn off Detect automatically and specify timezone offset of -7
it makes no difference.
When I set the offset to +7 hours then the time is too far ahead
If I set it to -1 hour then the displayed time is 1 hour too early
So, if I set the offset to 0 then the correct timestamp is displayed.
My guess is that the PLC is schizophrenic about the time it reports when queried and the time it uses to generate timestamps.
My guess is that the autodetect does indeed detect -7 hours but somehow that offset
is NOT applied by WinSCP due to some additional internal logic
Technically, if an offset is explicitly specified, WinSCP should just apply that to all timestamps.
My observation is that they are applied inconsistently
Perhaps the hour cannot be set such that the day is rolled back...
So for a file with a 11:00 AM local timestamp, which appeared as 04:00 filestamp in WinSCP
with default time detection,
If turning off time detection and specifying an explicit 0 hours offset shows the correct time 11:00 then specifying an explicit -7 hours should revert back to showing 04:00
Anyway, I kludged a workable solution but wanted to report what seems like an inconsistency to me... Perhaps I'm confused... It has happened once before ;-)
I believe the PLC time is in UTC - unless the timezone / offset is specified.
I am pretty sure that results in file timestamps written in UTC
SO...
The filestamps on the files when examined on the SDcard in Windoze are "correct"
(PLC thinks it is in UTC but is in local time)
When I look at the timestamps displayed by WinSCP, they are all 7 hours earlier
Theoretically the autodetect should take care of it BUT
when I set MLSD to OFF and turn off Detect automatically and specify timezone offset of -7
it makes no difference.
When I set the offset to +7 hours then the time is too far ahead
If I set it to -1 hour then the displayed time is 1 hour too early
So, if I set the offset to 0 then the correct timestamp is displayed.
My guess is that the PLC is schizophrenic about the time it reports when queried and the time it uses to generate timestamps.
My guess is that the autodetect does indeed detect -7 hours but somehow that offset
is NOT applied by WinSCP due to some additional internal logic
Technically, if an offset is explicitly specified, WinSCP should just apply that to all timestamps.
My observation is that they are applied inconsistently
Perhaps the hour cannot be set such that the day is rolled back...
So for a file with a 11:00 AM local timestamp, which appeared as 04:00 filestamp in WinSCP
with default time detection,
If turning off time detection and specifying an explicit 0 hours offset shows the correct time 11:00 then specifying an explicit -7 hours should revert back to showing 04:00
Anyway, I kludged a workable solution but wanted to report what seems like an inconsistency to me... Perhaps I'm confused... It has happened once before ;-)