Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Why Date Of Creation Of Custom Template Shows 1970-01-01

Quote Reply
Why Date Of Creation Of Custom Template Shows 1970-01-01
Why is it that Last Modified Date of any custom template is always 1970-01-01?

Is it supposed to be that way? If not then how could this be corrected to display the correct dates?

Anup
Quote Reply
Re: [anup123] Why Date Of Creation Of Custom Template Shows 1970-01-01 In reply to
Hi,

No, it should show you the last modified time of the file. Have a look at:

http://gossamer-threads.com/...admin-demo/admin.cgi

and you can see what it should look like.

Could be related to ownership issues you mentioned (as if the stat failed, then it would return 0 which would give you the time of 1970).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Why Date Of Creation Of Custom Template Shows 1970-01-01 In reply to
Hi Alex,

Just created test.htm (say a "custom template") in

http://gossamer-threads.com/...admin-demo/admin.cgi

in nessa and surprisingly, the date shown there is:

1969-12-31

Hope the doubt is clear...

Thnx

Anup
Quote Reply
Re: [anup123] Why Date Of Creation Of Custom Template Shows 1970-01-01 In reply to
Ah, doubt is clear, I thought you meant modified system templates (like address.htm). I'll have someone look into this.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Why Date Of Creation Of Custom Template Shows 1970-01-01 In reply to
I specifically mentioned "Custom Template"

It's simple. If there is no file to restore to then the dates will be displayed like that. I just deleted few files from the standard template set (but had a copy in /local) the dates fall back to 1970-01-01 in my case.....1969-12-31 in your case

Anup
Quote Reply
Re: [anup123] Why Date Of Creation Of Custom Template Shows 1970-01-01 In reply to
Yes, but I heard custom template to mean a template you have customized. We will get this fixed up.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [anup123] Why Date Of Creation Of Custom Template Shows 1970-01-01 In reply to
Open up admin/GMail/Admin/Setup/Template.pm and on around line 360 you'll see:
Code:
$return->{file_mod_time} = GT::Date::date_get((stat "$dir/$file")[9], $CFG->{date_user_format});
Change that to:
Code:
$return->{file_mod_time} = GT::Date::date_get((stat "$dir/local/$file")[9], $CFG->{date_user_format});

Adrian
Quote Reply
Re: [brewt] Why Date Of Creation Of Custom Template Shows 1970-01-01 In reply to
Hi Adrian,

Thnx and i have done the needed corrections. Also i have pm'ed the details you wanted to know about the Purge Messages Failure. Hope the solution to same is in sight soon.

Thnx

Anup