From 5cd580db6feb9d43dffb963c9344d48f415a0943 Mon Sep 17 00:00:00 2001 From: bsag Date: Sat, 13 May 2006 14:49:33 +0000 Subject: [PATCH] Changed the Timzone setting in the iCal file from a hardcoded value to the value of ENV['TZ'] which is set in config/environment.rb. If no timezone is set, and default of GMT is used. Updated the comment in the file to make this clear. Fixes #275 git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@243 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/feed/ical.rhtml | 15 ++------------- tracks/config/environment.rb.tmpl | 9 +++------ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/tracks/app/views/feed/ical.rhtml b/tracks/app/views/feed/ical.rhtml index b0775335..f3a69dc4 100644 --- a/tracks/app/views/feed/ical.rhtml +++ b/tracks/app/views/feed/ical.rhtml @@ -4,20 +4,9 @@ PRODID:-//rousette.org.uk//Tracks 1.04//EN CALSCALE:GREGORIAN METHOD:PUBLISH BEGIN:VTIMEZONE -TZID:Europe/London +TZID:<%= ENV['TZ'] || 'GMT' %> LAST-MODIFIED:<%= Time.now.strftime("%Y%m%dT%H%M%SZ") %> -BEGIN:DAYLIGHT -DTSTART:20060326T020000 -TZOFFSETTO:+0100 -TZOFFSETFROM:+0000 -TZNAME:BST -END:DAYLIGHT -BEGIN:STANDARD -DTSTART:20061029T020000 -TZOFFSETTO:+0000 -TZOFFSETFROM:+0100 -TZNAME:GMT -END:STANDARD +TZNAME:<%= ENV['TZ'] %> END:VTIMEZONE <% for @todo in @todos -%> BEGIN:VTODO diff --git a/tracks/config/environment.rb.tmpl b/tracks/config/environment.rb.tmpl index ce04f0f1..0270043e 100644 --- a/tracks/config/environment.rb.tmpl +++ b/tracks/config/environment.rb.tmpl @@ -53,10 +53,7 @@ end # You need to change this to something unique for yourself SALT = "change-me" -# Time zone setting. If the server on which you run Tracks is not the same -# as the time zone in which you are using it, you can uncomment the line below -# and set the time zone to your own (local value) to make the display of dates -# correct. You should be able to find a list of time zones in /usr/share/zoneinfo -# e.g. if you are in the Eastern time zone of the US, but your server runs under -# the GMT timezone, set the value below. +# Time zone setting. Set your local time zone here. # +# You should be able to find a list of time zones in /usr/share/zoneinfo +# e.g. if you are in the Eastern time zone of the US, set the value below. # ENV['TZ'] = 'US/Eastern'