Jump to content

Recommended Posts

Hi - I'm currently writing a family tree website and are having problems with really old dates.  [quote]The following code:$return = date("l d F Y", mktime(0, 0, 0, 1, 1, 1234));
echo "$return";[/quote] Returns:[quote]Thursday 01 January 1970[/quote]Any ideas?
As far as I know, the mktime() function gives you seconds from the epoch, which on your system is 01/01/1970 so it won't go any earlier than this without some calculation somewhere.

Have you done a search on these forums?  I just did a few searches and came up with a few really useful results... [url=http://www.phpfreaks.com/forums/index.php/topic,89933.0.html]Here's one[/url] for a start

Regards
Huggie
OK here is the file. I hope I can do this whithout getting in trouble if Iam not suppose to I am sorry and you may just delete this.

Use it like so

[code]<?php
require('includes/adodb-time.inc.php');

$startdate = adodb_date("d-M-Y", adodb_mktime(0,0,0,1,1,1869));
?>[/code]

Ray

[attachment deleted by admin]
This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.