From 5.3 the is_dst parameter is deprecated in mktime. But I need two previous time in timestamp, one of them with dst and the other without that.
E.g.: first time mktime("03","15","00","08","08","2008",1) and the other mktime("03","15","00","08","08","2008",0)
Can you help me to solve that problem?
Not a full answer, just some ideas I could think of… The DateTime::format() method accepts a format code that tells whether DST is on effect:
Now, in order to know what time it’d be if DST was the other way round, you have to find out when such change happens. This code:
… prints:
If you obtain the transitions for year the date belongs to, you can collect a list of offsets according for isdst TRUE and isdst FALSE. Once you pick an appropriate offset, the rest is easy: