|
|
#1 (permalink) |
|
Moderator
![]() Join Date: Dec 2004
Location: Canada
Age: 25
Posts: 10,115
|
I'm trying to get my timestamp(14) field to default populate to now and what ever function I use that is supposed to retrun the current time always returns the end of time (18th Jan 2038, 10:14:07 PM). Does anyone know what I'm doing wrong? (I'm sure it's something stupid but I can't track it down)
__________________
You know what the chain of command is? It's the chain I go get and beat you with 'til ya understand who's in ruttin' command here. I must plug a couple comics because they are good :D: www.ctrlaltdel-online.com www.userfriendly.org |
|
|
|
|
|
#2 (permalink) |
|
VIP Member
![]() Join Date: Nov 2004
Age: 25
Posts: 1,259
|
did you try using the NOW() function.
__________________
Acer A11912B 19"montior Aspire x-superalien case Asus k8t800 pro motherboard athlon 64 fx-55 2GB(2 of 1GB) of Geil DDR ram Geforce 6800 ultra 2 Seagate 200GB 7200RPM Model ST3200822A configure as RAID 0 1 DVDRW and 1 CDRW 3.5 drive sound blaster audigey2 zs logitech 2300 thx certified 2.1 speakers |
|
|
|
|
|
#3 (permalink) |
|
VIP Member
![]() Join Date: Dec 2003
Location: Toronto, Ontario
Age: 19
Posts: 1,302
|
Yes, NOW(), UNIX_TIMESTAMP(), DATE() etc. will all return the current date (see more from date and time functions).
Note that if you simply leave that field out when you are inserting or updating, mySQL will automatically populate the field with the current date and time from the server.
__________________
:: Devlog - New developer blog with useful PHP information :: The New Tech - Technology Forum :: WeTalk.tv - TV Forums |
|
|
|
|
|
#4 (permalink) |
|
Moderator
![]() Join Date: Dec 2004
Location: Canada
Age: 25
Posts: 10,115
|
yes I tried NOW(), NOW()+0, UNIX_TIMESTAMP() all gave me the date I posted
edit:even leaving blank results in 20050401191855 being returned
__________________
You know what the chain of command is? It's the chain I go get and beat you with 'til ya understand who's in ruttin' command here. I must plug a couple comics because they are good :D: www.ctrlaltdel-online.com www.userfriendly.org Last edited by Cromewell; 04-02-2005 at 12:22 AM. |
|
|
|
|
|
#5 (permalink) |
|
VIP Member
![]() Join Date: Dec 2003
Location: Toronto, Ontario
Age: 19
Posts: 1,302
|
Then somehow your system time is wrong, or mySQL doesn't like your system time
![]() What happens if you simply do Code:
SELECT NOW()
__________________
:: Devlog - New developer blog with useful PHP information :: The New Tech - Technology Forum :: WeTalk.tv - TV Forums |
|
|
|
|
|
#6 (permalink) | |
|
Moderator
![]() Join Date: Dec 2004
Location: Canada
Age: 25
Posts: 10,115
|
Nope that works fine...
Quote:
__________________
You know what the chain of command is? It's the chain I go get and beat you with 'til ya understand who's in ruttin' command here. I must plug a couple comics because they are good :D: www.ctrlaltdel-online.com www.userfriendly.org |
|
|
|
|
|
|
#7 (permalink) |
|
VIP Member
![]() Join Date: Dec 2003
Location: Toronto, Ontario
Age: 19
Posts: 1,302
|
Well that doesn't add up...
__________________
:: Devlog - New developer blog with useful PHP information :: The New Tech - Technology Forum :: WeTalk.tv - TV Forums |
|
|
|
|
|
#8 (permalink) |
|
Moderator
![]() Join Date: Dec 2004
Location: Canada
Age: 25
Posts: 10,115
|
no it doesn't, somethings fuggered up good and I'm just going to work around it now but if anyone comes up with something then by all means tell me
__________________
You know what the chain of command is? It's the chain I go get and beat you with 'til ya understand who's in ruttin' command here. I must plug a couple comics because they are good :D: www.ctrlaltdel-online.com www.userfriendly.org |
|
|
|