On Aug 4, 7:53 pm, Jeremy Evans <[email protected]> wrote:
> Currently, Sequel doesn't really pay much attention to time zones.
> When putting datetime values in the database, it generally omits the
> time zone information. When retrieving times, it just uses the parse
> method of the datetime_class, so if the string doesn't include time
> zone information, ruby will assume it is in local time
...
> Anyway, I want to get some general thoughts on this before I decide
> how to handle things. I don't think it is a lot of work to get Sequel
> to support UTC times, but I'd like to make sure it's simple for the
> user to use while still handling things correctly (when configured
> correctly, of course).
>
> I'm thinking about this API:
>
> # Converts datetimes to UTC on both input and output
> Sequel.convert_datetimes = :utc # or :local
>
> # Convert datetimes to UTC on input (going into the database)
> Sequel.convert_input_datetimes = :utc # or :local
>
> # Convert datetimes to UTC on output (coming out of the database)
> Sequel.convert_output_datetimes = :utc # or :local
>
> Jeremy
Three questions:
How is :local determined? If by the host local time then this would
have consistency implications for host transfers or multi-host
support. I realise that using UTC is indicated in these situations,
but sometimes the utc approach is not available, particularly when
dealing with so-called 'legacy' databases.
Is any provision contemplated for specifying arbitrary timezones;
+500, -1100, EST, PST, GMT, CET, etc. in addition to :local and :utc?
If this is done then to handle daylight savings nonsense one also
would have to provide for named timezones a la AR (Eastern Time (US &
Canada), Indiana (East).
Are the timestamp display options to implemented so as to provide
methods readily available for framework or custom controllers, views,
and helpers so that sessions may have displayed times automatically
adjusted to the user's own timezone, if such data is kept in the
application as part of their profile?
I realise that Sequel is strictly an ORM, but once one starts
detailing view specific items such as time then the uses made of this
information needs some consideration.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---