In article <7b84c3cd-2f16-4025-8f30-5cf237bcc372 / 33g2000yqm.googlegroups.com>,
  valodzka <valodzka / gmail.com> writes:

> This can be autoconfigured of course.

Good.

> Olson tz database uses 64 bit representation independently from time_t
> size.

My Debian Etch (i386) system uses TZif format (not TZif2 format).

% strings -a /usr/share/zoneinfo/Asia/Tokyo|head -1
TZif

Is this file 64 bit representation?

> Unfortunatly I haven't, and this is the biggest problem.

I wrote a patch:
http://www.a-k-r.org/tmp/ruby-big-time.patch

> This can be solved by marshaling both, time zone name and offset. If
> we have problem with time zone name - we can use offset.

But time zone name may not be preserved on marshal.
Marshal.load may ignore it if the system has no
corresponding timezone.  So, programmers shouldn't depend on
that.

Don't add a feature which should not be used.

> I doubt if 0.18 second per process is a big problem. And this  can be
> avoided by setting TZ enviroment variable.

Not so big but bit frustrated.
Ruby is used for one liner which is very short program.
0.18 second may be major factor of such program.

For TZ, no configuration is much better.

> I can imagine it, but it will be possible only with exotic systems.

If I remember correctly, Windows and HP-UX doesn't use Olson
timezone database.

I guess they have a timezone which is not included in the
database.  I'm not sure, though.

> There are one main problem with offset: it isn't fixed for fixed place
> (example with new york and manaus here
> http://groups.google.com/group/ruby-core-google/msg/f00c55f56482fc73),
> and I don't known how to solve it.

Yes.  This is what I said at the last sentence of
[ruby-core:22949].

But why you add a timezone at first place?

Assume a web based messaging system.
Each user has timezone preference.

User A sends a message to user B and C.
User B see the date of the message in the timezone of B.
User C see the date of the message in the timezone of C.

In this scenario, timezone should be used at constructing
the page for B and C.

The timezone of A is not used.  No need to store the
timezone of A in a Time object.

It is enough to set a timezone at the last place.
After the last place, Time object is used just for
formatted and embedded for a presentation form.
I.e. time calculations (Time#+, etc.) are not used after the
timezone is set.  So time offset is enough for this purpose.
-- 
Tanaka Akira