I'm having a problem with incorrect "created" dates.
"created" dates are showing one day ahead. I don't think it's the server because I did a echo date("Y") and it shows the correct date. I'm doing this echo date("Y m d", $page->created); to show the page/article date.
The timezone is set to New York time, which is fine as it's close enough.
I'm wondering if this problem is coming up because it's a leap year. I didn't want to fish around the core to find out how "created" was set after looking around and not being able to find it.
Anyone have any thoughts on this, or how to fix it?
Suspected leap year problem with "created" variable
Started by ClintonSkakun, Mar 02 2012 08:11 PM
solved dates times leap year
2 replies to this topic
#2
Posted 02 March 2012 - 09:30 PM
The 'created' field is set from a MySQL 'NOW()' command (current timestamp), rather than from ProcessWire or PHP. I would guess that your MySQL may be configured for a different timezone? I've not seen this difference before. Try this in a MySQL client (like PhpMyAdmin):
Based on your NY timezone, it should say this:
SHOW VARIABLES LIKE '%time_zone%'
Based on your NY timezone, it should say this:
system_time_zone EST time_zone SYSTEM
Also tagged with one or more of these keywords: solved, dates, times, leap year
Community Support →
Getting Started →
Why does $page->rootParent identify current section?Started by isellsoap, 27 Feb 2013 |
|
|
||
Community Support →
General Support →
Change default operator for ProcessPageSearch?Started by bcartier, 20 Dec 2012 |
|
|
||
Solved
Community Support →
General Support →
$image->size(); configuration questionsStarted by 97s, 02 Dec 2012 |
|
|
||
solved
Community Support →
Multi-Language Support →
Setting translated titleStarted by thomas.isberg, 30 Nov 2012 |
|
|
||
solved
Community Support →
Multi-Language Support →
Multi-Language support broken in dev-branchStarted by interrobang, 19 Nov 2012 |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













