ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custome Date Fields, DST and forcing to ’Fixed’

November 13, 2008 3:58am

Subscribe [1]
  • #1 / Nov 13, 2008 3:58am

    J.B.

    79 posts

    This question may be related to a resolved thread.

    I’m going to regret this, but per the related link, what is field_offset_64 ?  I’m looking at my DB tables and not finding this field, nor am I finding a field_offset_xx cooresponding with any of my custom fields.

    I’m needing to preset all my custom date fields to ‘fixed’ while setting my Daylight Saving Time and Honor the Daylight Saving Time… settings to No and then use the Server Offset to handle DST, but the only way I can get this to work is to force any custom date fields to ‘fixed’.

    It seems the Date_entry and Expire fields are not affected (or are treated as fixed regardless).

    Again, sorry if I’m being a dunce, but not quite getting this?

  • #2 / Nov 13, 2008 10:18am

    Robin Sowell

    13255 posts

    It’s only a field available for custom dates- should be in exp_weblog_data for each custom field that’s a date field.  You can see it if you go to ‘publish/edit’ for a weblog that has a custom date field.  Do that- reveal source- search the source for field_offset and you’ll spot it.  For example, when I do the above, I see:

    <select name='field_offset_64' class='select' >
    <option value='y' selected='selected'>Localized</option>
    <option value='n'>Fixed</option>
    </select>

    That help?

  • #3 / Nov 14, 2008 2:39am

    J.B.

    79 posts

    Good Lord, I just knew I was going to have the V-8 moment asking.  Yep that obviously resolves setting it in the SAEF’s.  Thanks for the slap to the forehead.

    However, and I’ll probably need another slap for this, I also want to do a mass update for all such existing entries.  I’m not seeing these fields listed or anything I can associate as the data in any of the weblog tables so I can do a quick SQL update for those records, rather than manually editing them all and double-checking that the time was not affected when form grabber displays the time (i.e. now that I have DST turned off, if I edit the date fields, timestamps will be updated 60 ahead requiring me to also update the timestamp for each custom date field in each post).

    In other words I don’t see a specific field labeled field_offset_7 in exp_weblog_data.  For the related field (i.e. in this case, field_id_7, there’s only a related field_ft_7 and field_dt_7.

    Nor do I see a related record in exp_weblog_fields that this would be an alias for.  I see items like ‘is hidden’, ‘show format’, ‘prepopulate’, but no ‘offset’.

  • #4 / Nov 14, 2008 6:28pm

    Robin Sowell

    13255 posts

    Tha’s tricker- it’s the dt setting.  But to mass update, I’d probably use some php.  Hit exp_weblog_fields to find the ids for all my date fields.  Then loop through the results- updating field_dt_x- where x is the id number from exp_weblog_fields.

    Let me shift you to ‘How to’ for some brainstorming, as it’s really not stock.  The php itself shouldn’t be too hard to tweak out, though.

  • #5 / Nov 14, 2008 8:52pm

    J.B.

    79 posts

    Ah-ha!  That’s what I was looking for and again feel like an idiot.  I could have sworn I updated an entry and looked at the related records for that specific field_dt/ft_x for changes, but obviously I wasn’t careful and missed it as I was focusing on DST settings vs. fixed/localized and hashing that out at the same time.  I need to slow down…

    Looks like you update the field to ‘UM6’ to set it to Fixed, localized is NULL.

    Thanks again for the help (er slap in the head), got if ‘fixed’... no pun intended *dodging the flying fruit*

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases