<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">A PC shows correct file dates, and a
file created on the PC is again shown incorrectly on the module,
so it's clearly the VFS.<br>
<br>
The stat() call seems to only apply the default time offset to get
UTC from the file date. localtime() then applies the correct
offset regarding summer time, ending up with an additional hour.<br>
<br>
I.e. file date is 10:14 → stat() applies -1 from "CET-1" → 09:14 →
localtime() applies +2 → 11:14.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
Am 06.06.2018 um 10:43 schrieb Mark Webb-Johnson:<br>
</div>
<blockquote type="cite"
cite="mid:98C7ACA8-37AB-49D1-9C14-2EC3BDFD536E@webb-johnson.net">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
My mac is showing Europe/Berlin as CET-1CEST,M3.5.0,M10.5.0/3.
That seems correct.
<div class=""><br class="">
</div>
<div class="">I think that if local time is showing correct, then
the posix time zone string is correct. It is now 8:34am UTC, and
10:34 CEST (Central European Summer Time).</div>
<div class=""><br class="">
</div>
<div class="">Perhaps VFS is not handling DST correctly? Can you
put the SD card in a PC and see what time is shown there? That
would tell us if it is the VFS or our handling?</div>
<div class=""><br class="">
</div>
<div class="">I read the FAT filesystems have no concept of time
zone, so timestamps could either be local or utc. Seems messy.</div>
<div class=""><br class="">
<div>Regards, Mark</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 6 Jun 2018, at 4:28 PM, Michael Balzer <<a
href="mailto:dexter@expeedo.de" class=""
moz-do-not-send="true">dexter@expeedo.de</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<div class="moz-cite-prefix">Just tested this entry from
the list:<br class="">
<pre class="" wrap="">"Europe/Berlin","CET-1CEST,M3.5.0,M10.5.0/3"</pre>
Same problem as with other public examples: local time
is correct, but file dates are offset 1 hour into the
future.<br class="">
<br class="">
<blockquote class=""><tt class=""># con set vehicle
timezone "CET-1CEST,M3.5.0,M10.5.0/3"</tt><br
class="">
<tt class="">Parameter has been set.</tt><br
class="">
<br class="">
<tt class=""># time stat</tt><br class="">
<tt class="">Time Zone: CET-1CEST;M3.5.0;M10.5.0/3</tt><br
class="">
<tt class="">UTC Time: 2018-06-06 08:15:18 UTC</tt><br
class="">
<tt class="">Local Time: 2018-06-06 10:15:18 CEST</tt><br
class="">
<tt class="">Provider: ntp</tt><br class="">
<tt class="">PROVIDER STRATUM UPDATE
TIME</tt><br class="">
<tt class=""> gsm-nmea 2 12
Wed Jun 6 08:15:18 2018</tt><br class="">
<tt class="">*ntp 1 53
Wed Jun 6 08:15:17 2018</tt><br class="">
<br class="">
<tt class=""># vfs ls /sd</tt><br class="">
<tt class="">…</tt><br class="">
<span class=""><tt class=""> 5 06-Jun-2018 11:14
testdate</tt></span><br class="">
<span class=""></span></blockquote>
<span class=""><br class="">
Maybe this is a bug in the vfs.<br class="">
</span><br class="">
<span class=""><span class="">"<tt class="">CET-2,M3.5.0/02:00:00,M10.5.0/03:00:00</tt>"
works correctly now but I haven't tested if it
would adapt to winter time.<br class="">
</span><br class="">
</span>Regards,<br class="">
Michael<br class="">
<br class="">
<br class="">
Am 06.06.2018 um 08:56 schrieb Mark Webb-Johnson:<br
class="">
</div>
<blockquote type="cite"
cite="mid:2CA39356-2A66-416E-92D4-D308EDD87A03@webb-johnson.net"
class="">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" class="">
A topic on <a href="http://esp32.com/" class=""
moz-do-not-send="true">esp32.com</a> brought up
this:
<div class=""><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none;
padding: 0px;" class="">
<div class=""><a
href="https://github.com/nayarsystems/posix_tz_db"
class="" moz-do-not-send="true">https://github.com/nayarsystems/posix_tz_db</a></div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">The approach seems similar to what I
spoke about before (scrape tzdata, although they
scrape install zone files directly in
/usr/share/zoneinfo). I’ve attached the csv output
of that. 460 time zones, about 15KB code size. That
is up-to-date with tzdata 2018d-1. Including a
simple library wrapper, to (a) iterate over the zone
names, and (b) return the posix string for a
particular name, probably less than 20KB overhead.</div>
<div class=""><br class="">
</div>
<div class="">I live in such a simple timezone, it is
hard for me to judge. Is this any use?</div>
<div class=""><br class="">
</div>
<div class="">Regards, Mark.</div>
<div class=""><br class="">
</div>
</blockquote>
<br class="">
<br class="">
<pre class="moz-signature" cols="144">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
</div>
_______________________________________________<br
class="">
OvmsDev mailing list<br class="">
<a href="mailto:OvmsDev@lists.openvehicles.com" class=""
moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a><br
class="">
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br
class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<!--'"--><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="144">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
</body>
</html>