#12894 closed defect (bug) (invalid)
mktime inconsistent between 2.9 and 3.0
Reported by: | arena | Owned by: | arena |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | General | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
on the same pc, same environment :
with 2.9
mktime( 0, 0, 0, 04, 8, 2010 ) gives 1270677600 (Wednesday, April 7th 2010, 22:00:00 (GMT))
with 3.0beta1
mktime( 0, 0, 0, 04, 8, 2010 ) gives 1270684800 (Thursday, April 8th 2010, 00:00:00 (GMT))
Change History (10)
#2
in reply to:
↑ 1
@
15 years ago
Replying to scribu:
The second one appears to be correct, so what's the problem?
It's probably the effect of [12727]
My PHP settings are (php.ini)
[Date] ; Defines the default timezone used by the date functions date.timezone =Europe/Paris
and my wordpress settings are :
Timezone : Paris which is equivalent to UTC+2
UTC time is 2010-04-07 20:34:07 Local time is 2010-04-07 22:34:07
The first is the right one (http://fr.php.net/mktime).
so the 04/08/2010 00:00 local time is 07/04/2010 22:00:00 GMT
#3
@
15 years ago
sorry, last line of my previous post should be
so the 04/08/2010 00:00 local time is 04/07/2010 22:00:00 GMT
retauring [12727] doesn't change a thing !!!
#6
in reply to:
↑ 5
@
15 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Replying to scribu:
So what was the issue?
still don't know, i made several attempts to have my plugin code as clean as possible and the error remains.
in 2.9 for same date mktime and gmmktime gives different timestamps
mktime( 0, 0, 0, 4, 8, 2010 ) : 1270677600
gmmktime( 0, 0, 0, 4, 8, 2010 ) : 1270684800
in 3.0 for same date mktime and gmmktime gives SAME timestamps
mktime( 0, 0, 0, 4, 8, 2010 ) : 1270684800
gmmktime( 0, 0, 0, 4, 8, 2010 ) : 1270684800
#7
@
15 years ago
still don't know, i made several attempts to have my plugin code as clean as possible and the error remains.
in 2.9 for same date mktime and gmmktime gives different timestamps
mktime( 0, 0, 0, 4, 8, 2010 ) : 1270677600
gmmktime( 0, 0, 0, 4, 8, 2010 ) : 1270684800
in 3.0 for same date mktime and gmmktime gives SAME timestamps
mktime( 0, 0, 0, 4, 8, 2010 ) : 1270684800
gmmktime( 0, 0, 0, 4, 8, 2010 ) : 1270684800
The second one appears to be correct, so what's the problem?
It's probably the effect of [12727]