[Pkg-pascal-devel] Bug#864148: [fp-units-rtl-3.0.0] Incorrect conversion from local time to UTC

Abou Al Montacir abou.almontacir at sfr.fr
Sun Jun 4 12:34:21 UTC 2017


Package: fp-units-rtl-3.0.0
Version: 3.0.0+dfsg-11
Severity: important
Tags: patch

--- Please enter the report below this line. ---
I'm trying to play with local time / UTC conversion and come to a strange issue

I'm using Linux and seems that the conversion is done in the opposite side

I mean that LocalTimeToUniversal(Now); gives me LT + 2 instead of LT - 2 (I'm in
Paris)
Reproducing this issue is as easy as using the attached file and running this
command:
$ifpc /tmp/utc.pas 
Local TS = 2017-06-02 19:33:614
UTC TS = 2017-06-02 21:33:614
GetLocalTimeOffset = -120
This was submitted to upstream [1] and seems to be fixed with attached patch.
[1]: https://bugs.freepascal.org/view.php?id=31954 id="-x-evo-selection-start-
marker">--- System information. ---Architecture: 
Kernel:       Linux 4.9.0-3-amd64

Debian Release: 9.0
  500 unstable        riot.im 
  500 testing         security.debian.org 
  500 testing         ftp.fr.debian.org 
  500 stable          repo.skype.com 
  500 stable          dl.google.com 
  500 sid             linux.dropbox.com 

--- Package information. ---
Package's Depends field is empty.

Recommends                    (Version) | Installed
=======================================-+-==================
fp-compiler-3.0.0     (= 3.0.0+dfsg-11) | 3.0.0+dfsg-11


Package's Suggests field is empty.
-- 
Cheers,
Abou Al Montacir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20170604/3e8eda45/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utc.pas
Type: text/x-pascal
Size: 308 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20170604/3e8eda45/attachment.pas>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Correct-for-different-meaning-of-TZOffset.patch
Type: text/x-patch
Size: 1255 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20170604/3e8eda45/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20170604/3e8eda45/attachment.sig>


More information about the Pkg-pascal-devel mailing list