Invalid time zone 'SAST' #12

Closed
leebrooks0 opened this Issue Nov 14, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@leebrooks0

I am trying to use https://github.com/tomykaira/clockwork with SAST, but keep getting told it is an invalid timezone?

I reported the issue at https://github.com/tomykaira/clockwork/issues/65#issuecomment-28450803
and was told it could be a problem with tzinfo?

@philr

This comment has been minimized.

Show comment
Hide comment
@philr

philr Nov 14, 2013

Member

TZInfo allows you to use time zones defined in the IANA Time Zone Database. SAST is not a valid time zone identifier in the database.

The database defines Africa/Johannesburg as the time zone for South Africa (see https://github.com/tzinfo/tzinfo-data/blob/master/data/zone.tab), so you could use this as your Clockwork configuration.

It looks like Clockwork uses ActiveSupport for its time zone support (ActiveSupport in turn relies upon TZInfo). You can therefore also use ActiveSupport's Pretoria time zone (an alias for Africa/Johannesburg - see https://github.com/rails/rails/blob/master/activesupport/lib/active_support/values/time_zone.rb).

Member

philr commented Nov 14, 2013

TZInfo allows you to use time zones defined in the IANA Time Zone Database. SAST is not a valid time zone identifier in the database.

The database defines Africa/Johannesburg as the time zone for South Africa (see https://github.com/tzinfo/tzinfo-data/blob/master/data/zone.tab), so you could use this as your Clockwork configuration.

It looks like Clockwork uses ActiveSupport for its time zone support (ActiveSupport in turn relies upon TZInfo). You can therefore also use ActiveSupport's Pretoria time zone (an alias for Africa/Johannesburg - see https://github.com/rails/rails/blob/master/activesupport/lib/active_support/values/time_zone.rb).

@philr philr closed this Nov 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment