Jump to content

MySQL 1970-01-01


web2008

Recommended Posts

For many years I have had problems with the field "expirydate" in the table "tbldomain" changing back to MySQL standard value 1970-01-01 when a customer moves a domain.

I use a custom registrar module and this does not have Domainsync.

Basically, it doesn't matter if the date changes, when the domain is moved, but what happens is that WHMCS generates an invoice because the domain has got a new date and this is not good !

I see that the field "expirydate" has "Not null" as opposed to the other "date" fields. Could this be the problem ?

Is there anyone who has a suggestion for a solution to this?

Alternatively, one could put a block on the Auth Code, so that the customer did not receive it before Auto Renewal Status was set to OFF, so that a new invoice was not generated.

Link to comment
Share on other sites

  • WHMCS Staff

Hi @web2008!

Could you provide a little more information here?

  1. How are you "moving" the domain?
  2. Where are you moving it from and to?
  3. If moving these in a custom way, please provide any SQL queries/code samples.

Once I have this additional information, I'd be pleased to try and assist you.

 

Link to comment
Share on other sites

  • WHMCS Staff

Hi!

When a domain is transferred in, WHMCS does not yet know the expiry date for the domain and for that reason, is not applied.

1970-01-01 is the first date in "Epoch Time" and due to that, is the date that PHP will default to.

When a Domain is transferred in, WHMCS will usually retrieve the correct Expiry Date via the Domain Sync however, as this is not possible, it is expected that the Administrator will enter the Expiry Date and Next Due Date for the domain manually at the time of activation.

With the Domain Syncronisation feature WHMCS is able to identify when a domain transfer has been completed or failed. It will ensure that the Next Due Date, Expiry Date, and Status values are updated for domains on the installation. As mentioned, because your module does not support this, these values must be manually set.

I hope this helps.

Link to comment
Share on other sites

Thank you so much WHMCS Peter for the detailed explanation of domains and dates. 

But what I don't understand and find an explanation for, is why the date changes when everything is OK before the domain is moved?

Else, Steven99 asks the right questions and what about my "Not null" question? What is the difference?

And here is an old link, with similar issues:

https://whmcs.community/topic/24433-dates-shows-as-1970/?tab=comments#comment-135049

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated