Latest changes in DO adapters includes usage of UTC offset
calculations using tm_gmtoff member of tm structure, which is not part
of the CRT for OS outside posix.
That imposes a problem for me to compile the latest version of the
adapters, since I'm on Windows.
Was working on a patch lastnight but can't continue doing it since I'm
overloaded by daily job tasks (maybe can take a look during weekend).
I was thinking someone can implement a cross-platform utc_offset
function? Right now the code used is here:
http://github.com/sam/do/tree/master/do_mysql/ext/do_mysql_ext.c#L197-L213
And also another "offset in seconds" here:
http://github.com/sam/do/tree/master/do_mysql/ext/do_mysql_ext.c#L231
Basically, that can be extracted and implemented in a way similar
time.c from Ruby itself is done:
Any takers?
--
Luis Lavena
AREA 17
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams
http://wm.lighthouseapp.com/projects/4819/tickets/339-windows-utf-offset
I did a little bit of research and tried something for do_postgres. If
someone wants to try applying the patch and running it on Windows,
that would be great.
Bernerd Schaefer
I just replied to this ticket (dunno was being marked as spam).
Anyway, if you have your system on Greenwich timezone (+0) the specs
fails. If you have your timezone in +1 (like I do now) it fails but
only one spec.
If you move into a negative timezone (anything left of Greenwich
meridian I get 2 failures...
I'll see when I can get time to work on this, but please feel free to
takle this task since you was in the good patch (er, I mean path!)
Followup to ticket:
http://wm.lighthouseapp.com/projects/4819/tickets/339-windows-utf-offset#ticket-339-9
If I comment out the is_dst condition (if is_dst > 0) it works for any
timezone, negative, zero and possitive, with or without daylight
saving.
FYI,