[DateBug] Year 2000 bug?

Hello there,

I realised that the function

ToString(Time(mday))+"."+ToString(Time(mon))+"."+ToString(Time(year))+" - “+ToString(Time(hour))+”:"+ToString(Time(min))

leads to

22.10.111 - 9:56

ToString(Time(mday))+"."+ToString(Time(mon)+1)+"."+ToString(Time(year)+1900)+" - “+ToString(Time(hour))+”:"+ToString(Time(min))

22.11.2011 - 9:56

this is a workaround,works for now/me …, or did I get something horrible wrong with the function? :slight_smile: I am not a coder, so this might be the answer to this issue :blush:

In fact, it’s not really a bug : the GD function Time(year) mimics the way some programming languages like C work : They are returning the years elapsed since 1900. ( By the way, it is normally indicated when GD is asking you for the parameter that the number returned for “year” is “years since 1900” ).

Anyway, I must admit that it’s quite strange but your workaround is absolutely correct.