Gossamer Forum
Quote Reply
Date Problem
When an email is sent for links that are expiring, the expired date says Dec 31,1969 in the message, instead of the correct date that the link will expire on.


Anyone know how to correct this problem?
Quote Reply
Re: [rascal] Date Problem In reply to
Hi,

Have you checked the server time? You can do this pretty easily in SSH/Telnet, by typing;

date

...which should give you something like this;

Fri Jan 7 16:23:12 GMT 2005

If that is showing up, then it could be a deeper problem. Its always worth checking out the simple stuff first, as I've learned myself <G>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Date Problem In reply to
Andy,

I have checked the server date, its correct! I believe this may be a bug in 2.2.0, but I'm no expert. I have no other problems with the date, just the date in the expired email shows Dec 31,1969.
Quote Reply
Re: [rascal] Date Problem In reply to
In Reply To:
Andy,

I have checked the server date, its correct! I believe this may be a bug in 2.2.1, but I'm no expert. I have no other problems with the date, just the date in the expired email shows Dec 31,1969.
Quote Reply
Re: [rascal] Date Problem In reply to
Does anyone know why this is happening?

Help!!!
Quote Reply
Re: [rascal] Date Problem In reply to
I had a similar problem.
This was down to adding a new column in the Links table which couldn't be filled with data. I'd set it to be Notnull but this caused the information not to be able to be updated in this column. This then had a knock on effect that caused the expiration date column to display a very similar date that you see (mine was getting stuck at a default of around 1970!!).

It was discovered by looking at the Apache and Mysql error logs.
Might also be worth asking dearnet;

http://www.gossamer-threads.com/...forum.cgi?post=68397

Cheers,
Piers

Last edited by:

Piers1: Jan 20, 2005, 2:00 AM
Quote Reply
Re: [Piers1] Date Problem In reply to
I wish that Gossamer would look at this forum and help people who are having problems with there product.

Well I guess if users support there product and work for them for FREE, why should they respond.

You should not have to email them, they should be watching the forums until they put out a bug free product!!!!


Yes it is a good product after the users fix all the bugs in it for them.

They should send Andy, Pugdog and others a weekly check!!!!!

Thank God we have these people to help us.
Quote Reply
Re: [rascal] Date Problem In reply to
In my case the problem was swiftly resolved by GT support. Another part of the program wouldn't work due to my error, which they found......
Just so you know,

Cheers,

Piers
Quote Reply
Re: [Piers1] Date Problem In reply to
I'm glad they helped you solve your problem, but the fact is they should monitor there forums.

After all most users post there problems or ask questions in the forums.

As you can see they don't monitor this forum, oh wait a minute, maybe I should inquire about purchasing one of there products.
Quote Reply
Re: [rascal] Date Problem In reply to
Is the expiry date of the link itself correct in the database? Is it only incorrect in the email?

Adrian
Quote Reply
Re: [brewt] Date Problem In reply to
Hello,

The date in the database is correct, if I set an expired date from the admin panel it is saved in the following format:

2005/1/22 00:00:00

Notice there is no hrs. mins. secs.

If a user submits a link, the hrs. mins. secs. show up.

Is this normal?


Thank You for responding
Quote Reply
Re: [rascal] Date Problem In reply to
That's normal, if you're not specifying the hours/mins/secs.

Which email are you sending out that's not getting the expiry date properly?

Adrian
Quote Reply
Re: [brewt] Date Problem In reply to
This is the code that displays the incorrect Date in the email:


The following web sites have expired:
<%loop expiry_links%>
- <%Title%> (ID #<%ID%>)
Expiry Date: <%ExpiryDate%>.
Renewal Payment: <%renewal_url%>
<%endloop%>

Thanks again for helping me!!!
Quote Reply
Re: [rascal] Date Problem In reply to
Which email are you sending out that's not getting the expiry date properly?

Adrian
Quote Reply
Re: [brewt] Date Problem In reply to
Sorry, its

email_expired.txt
Quote Reply
Re: [rascal] Date Problem In reply to
Looking at the code, if you're getting broken dates, then the most likely reason is that the expiry date is -1, which means the link is still awaiting payment. There is a bug in the code that causes it to send link expiry notices for links which are still awaiting payment. Here's the fix:
Code:
--- admin/Links/Payment.pm 5 Nov 2004 03:55:15 -0000 1.59.2.6
+++ admin/Links/Payment.pm 24 Jan 2005 23:58:59 -0000
@@ -1479,6 +1479,7 @@
'Username', 'Email', 'Name', 'ID', 'Title', 'ExpiryDate',
GT::SQL::Condition->new(
ExpiryDate => '<' => time,
+ ExpiryDate => '>' => UNPAID,
ExpiryNotify => '<' => 2
)
) or die $GT::SQL::error;

Can you check that the link is really expired? If it is, then it's a separate bug.

Adrian

Last edited by:

brewt: Jan 24, 2005, 3:53 PM
Quote Reply
Re: [brewt] Date Problem In reply to
Glad you found this bug!!

My code now looks like this:

# Load links that have been expired
$db->select_options('ORDER BY Username');
my $exp_links = $db->select(
'Username', 'Email', 'Name', 'ID', 'Title', 'ExpiryDate',
GT::SQL::Condition->new(
ExpiryDate => '<' => time,
ExpiryDate => '>' => UNPAID,
ExpiryNotify => '<' => 2
)
) or die $GT::SQL::error;


I will check if the link is expired, if I continue to have a problems with the date.

I will let you know if the above solved the problem.

Cool
Thank You