This isn't a bug, but it is a tricky little UK gotcha. We calculate future dates from a given date using something like: $timestamp:=timestamp(2012; 3; 28 ; 0; 0; 0; 0) ` 28th March 2012 midnight local time $timestamp:=add to timestamp($timestamp; 1; 0; 0) ` Add one year (for example) day:=timestamp day($timestamp) ` Get the day = 27th March 2013
This example gives us the wrong day, but it is technically correct. The problem (for us) is British Summer Time (BST), but I'm guessing there may be a similar problem with other countries that have "summer time" and are close to GMT (UTC). The problem occurs because BST doesn't start on the same date every year. 28th March 2012032800~ timestamp above is adjusted to UTC which makes it 201203272300~ (27th). Adding a year makes it 201303272300. Oops. BST in 2013 starts on 31st March, so we're still GMT. Day returned therefore is the 27th. Easily fixed by using midday as the time, but since midnight is the local time default I thought you folk should be aware of the problem! Cheers! Tony Pollard Another Dimension Ltd _______________________________________________ Active4D-dev mailing list [email protected] http://list.aparajitaworld.com/listinfo/active4d-dev Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/
