Item9677: Func::saveAttachment have NOW and not 1 Jan 1970 as default date
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
I'm writing
WikiDrawPlugin atm, and testing on trunk - presumably this is an issue on 1.1.0 too
when my plugin calls
Foswiki::Func::saveAttachment( $svgweb, $svgtopic, $svgattachment,
{ file => $tmpFile,
comment => $svgcomment,
hide => 0
} );
the resultant meta shows a date of
01 Jan 1970 - 00:00
, or unix 0 in the attachment table.
I havn't tested against 1.0.x yet (or tmwiki even), but I will be surprised if this is correct. if it
is correct, then the Func.pm docco needs updating to indicate that a filetime is compulsory.
--
SvenDowideit - 15 Sep 2010
I am sure that noone in this world can have any code that relies on the date being epoch 0.
Only reasonable default is time=now.
You cannot possibly break anything with respect to compatibility by treating this as a bug and fixing it to it default to now unless given a time.
--
KennethLavrsen - 15 Sep 2010
This problem was also present in 1.0.X.
I have verified by practical test.
I have made time() the default if no date is given. Noone can have used the epoch 0 as useful default.
Setting to Waiting For Release.
--
KennethLavrsen - 26 Sep 2010