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.

{current_time} and {entry_time}

August 15, 2008 6:51pm

Subscribe [2]
  • #1 / Aug 15, 2008 6:51pm

    mhancock

    9 posts

    Having problems with {current_time} and an entries {entry_time}.

    I post an entry and it records an entry_time of 1218852780.  I immediately go to my web page and refresh which calls {current_time format="%U"} which displays at 1218836333???

    This shows the current time as being smaller than the entry time of the weblog just entered.  The current_time should be later.  I am very confused…

    I am using the query module to perform some custom queries that rely on comparing {entry_time} and {expiration_time} to the {current_time}.  Do to this inconsistency, my query is not returning what I want.

    Any suggestions?

    Thanks,
    Mike

  • #2 / Aug 15, 2008 8:34pm

    Derek Jones

    7561 posts

    The current time variable output is localized, the entry date stored in the database is GMT, so the current time variable would only be comparable to the localized entry date.  Any reason you’re using the query module instead of the weblog entries tag?  The start_on=, stop_before=, and show_expired= parameters are all designed to give you access to entry output based on the criteria you are mentioning.

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

ExpressionEngine News!

#eecms, #events, #releases