README.md in rufus-scheduler-3.0.0 vs README.md in rufus-scheduler-3.0.1

- old
+ new

@@ -76,11 +76,11 @@ * As said, no more EventMachine-based scheduler * ```scheduler.every('100') {``` will schedule every 100 seconds (previously, it would have been 0.1s). This aligns rufus-scheduler on Ruby's ```sleep(100)``` * The scheduler isn't catching the whole of Exception anymore, only StandardError * The error_handler is #on_error (instead of #on_exception), by default it now prints the details of the error to $stderr (used to be $stdout) * Rufus::Scheduler::TimeOutError renamed to Rufus::Scheduler::TimeoutError -* Introduction of "interval" jobs. Whereas "every" jobs are like "every 10 minuts, do this", interval jobs are like "do that, then wait for 10 minutes, then do that again, and so on" +* Introduction of "interval" jobs. Whereas "every" jobs are like "every 10 minutes, do this", interval jobs are like "do that, then wait for 10 minutes, then do that again, and so on" * Introduction of a :lockfile => true/filename mechanism to prevent multiple schedulers from executing * "discard_past" is on by default. If the scheduler (its host) sleeps for 1 hour and a ```every '10m'``` job is on, it will trigger once at wakeup, not 6 times (discard_past was false by default in rufus-scheduler 2.x). No intention to re-introduce ```:discard_past => false``` in 3.0 for now. * Introduction of Scheduler #on_pre_trigger and #on_post_trigger callback points @@ -1049,9 +1049,41 @@ # => { :m => 1, :s => 2, :ms => 127 } Rufus::Scheduler.to_duration_hash(62.127, :drop_seconds => true) # => { :m => 1 } ``` + +## a note about timezones + +Cron schedules and at schedules support the specification of a timezone. + +```ruby +scheduler.cron '0 22 * * 1-5 America/Chicago' do + # the job... +end + +scheduler.at '2013-12-12 14:00 Pacific/Samoa' do + puts "it's tea time!" +end + +# or even + +Rufus::Scheduler.parse("2013-12-12 14:00 Pacific/Saipan") + # => 2013-12-12 04:00:00 UTC +``` + +Behind the scenes, rufus-scheduler uses [tzinfo](http://tzinfo.github.io/) to deal with timezones. + +Here is a [list of timezones](misc/tz_all.txt) known to my Debian GNU/Linux 7. It was generated with this script: + +```ruby +require 'tzinfo' +TZInfo::Timezone.all.each { |tz| puts tz.name } +``` + +Unknown timezones, typos, will be rejected by tzinfo thus rufus-scheduler. + +On its own tzinfo derives the timezones from the system's information. On some system it needs some help, one can install the 'tzinfo-data' gem to provide the missing information. ## support see [getting help](#getting-help) above.