Closed (duplicate)
Project:
Date
Version:
6.x-2.x-dev
Component:
Date Timezone
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 May 2010 at 18:06 UTC
Updated:
27 Aug 2012 at 17:59 UTC
Jump to comment: Most recent file
Comments
Comment #1
mnlund commentedI second this. I ran into the exact problems described in the referenced post.
Comment #2
itangalo commentedAttached is a start for a patch – I had some trouble understanding all the calls made within date_token_values().
The patch currently only supports UTC/GMT by subtracting the site's default time zone – ideally it should of course adjust to whatever time zone settings are applied to the date field in question.
(It didn't seem as the field's value for timezone or timezone_db changed when I changed the settings for the field. If anyone would like to explain what's actually being stored I'd be grateful.)
My hope for this patch is (a) that it may be of use for anyone interested in using Rules Scheduler and only adjusting for default time zone; and (b) that it may be a starting point for a full patch.
I don't consider it a patch that should be included in Date.
Cheers!
Comment #3
letapjar commentedI applied this patch but the rules scheduler still seems to be using the incorrect time. Is there an easy way to check the output of this token?
Comment #4
itangalo commentedYou could try configuring a rule to 'display a customizable message on the site', and just inserting the UTF token there. If it is not working properly -- could you provide details of your date configuration on the site? (Are you, for instance, date settings per user? Or how is the date field in question configured?)
Cheers!
Comment #5
letapjar commentedthanks for the feedback - I found the error - somehow the "on content has been updated" rule was firing when new nodes were created thus wiping out some time information that i was trying to use with rules.
Turns out I did not need to use the utc date format - I just set my cck date field input format to
something like 12/07/2010 7:00PM -05:00 (i.e. a formant adjusted for the site's time zone relative to UTC) - then rules scheduler does the right thing at the right time.
I would add one thing to the patch thought - you have the date-utc field - but users will also expect the date-to-utc field which will do the same conversion for the "to" part of a cck date field.
Comment #6
lyricnz commentedI think this problem would be more generally solved by exposing all currently defined date-format-types and custom-date-formats as tokens, as provided in this issue: #593840: Include tokens for custom date formats for date fields. Then you can just add whatever date format you want to your site, and it will be provided as a token.
Comment #7
colan