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.

dst_enabled doesn't work anymore?

March 13, 2011 12:13pm

Subscribe [2]
  • #1 / Mar 13, 2011 12:13pm

    ak4mc

    429 posts

    I include an IF tag in the datestamps on my entries to display whether they were posted in standard time or DST. The tag looks like this:

    {if dst_enabled == "y"}
     EDT
    {if:else}
     EST
    {/if}

    This morning I posted a new entry with daylight saving time in effect (all relevant settings previously hunted down and updated—I think; but that’s another complaint) but the datestamp still displays “EST.”

    I’ve also tried changing “y” to “yes” and “1”, just in case. None make a difference.

    The time display is accurate, it’s only “dst_enabled” that doesn’t seem to work, so I’m wondering if that’s what’s incorrect. What switch should I be using?

  • #2 / Mar 14, 2011 4:32am

    John Henry Donovan

    12339 posts

    ak4mc,

    To confirm. You have this condition inside yoru exp:channel:entries tag?

    Add the variable {dst_enabled} and see what values it returns for your new entry posted in DST as opposed to your other entries

  • #3 / Mar 14, 2011 9:35am

    ak4mc

    429 posts

    ak4mc,

    To confirm. You have this condition inside your exp:channel:entries tag?

    That’s right. If it weren’t, the entire datestamp portion of the code would fail because it’s part of that.

    Add the variable {dst_enabled} and see what values it returns for your new entry posted in DST as opposed to your other entries

    It says “n” on every entry, regardless of standard time or DST. This suggests there’s a DST setting somewhere in the CP that I overlooked and have no idea where to find—remember in my initial post where I said, “but that’s another complaint”...?

    Except, everything else about Daylight Saving Time in my system is working properly. So I think what’s more likely is that the name of the field has been changed in EE2.

  • #4 / Mar 14, 2011 5:10pm

    Sue Crocker

    26054 posts

    The name of the field hasn’t changed, but doublecheck that the value was actually set to y for that entry in exp_channel_titles. In my case, it wasn’t using EE 2.1.3. I’ll have to check that in EE 2.1.4 Beta.

  • #5 / Mar 14, 2011 5:21pm

    ak4mc

    429 posts

    Ah—a bug, then? You’re right, the values weren’t set to “y” despite DST having been set.

    I’ll keep the code commented out until I get 2.1.4

  • #6 / Mar 15, 2011 10:23am

    Sue Crocker

    26054 posts

    The same thing happens in EE 2.1.4 Beta. Checking to see what is supposed to be happening. Thanks in advance for your patience.

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

ExpressionEngine News!

#eecms, #events, #releases