Date/Timestamp Question
Moderator: General Moderators
- Pyrite
- Forum Regular
- Posts: 769
- Joined: Tue Sep 23, 2003 11:07 pm
- Location: The Republic of Texas
- Contact:
Date/Timestamp Question
I am developing a website/software that is going to be used for many years to come, and the site itself is planned to be used on Windows & Unix Servers. So right now I am using timestamps for dates (registration dates, birthdates, etc). I recently found out that Windows cannot make use of timestamps before 1970 or after 2038. So is there another way I can store my dates and still be able to format them. I am using timestamps so I can format them easily with the date function. If I store the date in MySQL in the format YYYY-MM-DD or whatever, is there a way to format it with php? Ideas?
Also, this is a multi-lingual site, and using timestamps allows me to set the right locale for each language so that the date function will format the date using that locale.
Also, this is a multi-lingual site, and using timestamps allows me to set the right locale for each language so that the date function will format the date using that locale.
Last edited by Pyrite on Fri Mar 05, 2004 4:12 am, edited 1 time in total.
try this library:
http://66.102.9.104/search?q=cache:pC9_ ... n&ie=UTF-8
not sure if it supports locale properly (if does it at all).
http://66.102.9.104/search?q=cache:pC9_ ... n&ie=UTF-8
not sure if it supports locale properly (if does it at all).
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Re: Date/Timestamp Question
You think your site is going to be use until 2038? I don't even think the internet as we know it will exist thenPyrite wrote:I am developing a website that is going to be used for many years to come.....timestamps before 1970 or after 2038.
Mark
Last edited by JayBird on Fri Mar 05, 2004 4:13 am, edited 1 time in total.
- Pyrite
- Forum Regular
- Posts: 769
- Joined: Tue Sep 23, 2003 11:07 pm
- Location: The Republic of Texas
- Contact:
Well, my site isn't just for the Internet man (why the hell does everyone always question my logic?), also using my (lets just call it software instead of a website) software on CD's, DVD's and Flash Drives. My software will be used my hundreds of thousands of people for the next 100 years or more.
Ps. Wierdan to my Rescue (as Usual), that looks like exactly what I need. And I am already using ADOdb, so even better. Just have to test it. It should still work with the current locales, I'll let ya know if it does. Thanks Weirdan!!
Ps. Wierdan to my Rescue (as Usual), that looks like exactly what I need. And I am already using ADOdb, so even better. Just have to test it. It should still work with the current locales, I'll let ya know if it does. Thanks Weirdan!!
- Pyrite
- Forum Regular
- Posts: 769
- Joined: Tue Sep 23, 2003 11:07 pm
- Location: The Republic of Texas
- Contact:
I know, it's just that since day one, every thing I need help with that i've posted on these forums, everytime somebody just sits there and questions me on why I would do such a thing, or want to. My job involves a lot of thinking outside the box, and most people don't understand that. I'm not yelling, just perplexed. I appreciate your comments regardless.
- Pyrite
- Forum Regular
- Posts: 769
- Joined: Tue Sep 23, 2003 11:07 pm
- Location: The Republic of Texas
- Contact:
I know, I ought to write up a thread on what my project involves to refer people to when I ask these obsurd questions. Basically, it's a teaching/distance education site, that I also am not just using on the internet, but other mediums like I said. Kinda taking php/html and using them in a way that they weren't intended for.. but it is worth it for me.
- Bill H
- DevNet Resident
- Posts: 1136
- Joined: Sat Jun 01, 2002 10:16 am
- Location: San Diego CA
- Contact:
Sorry, but I have to question that...for the next 100 years or more.
Things change. Technology changes. Society changes. Mores change. Everything changes. Even religion changes to some degree.
The world is so different in just the sixty years that I have been alive that I can scarcely recognize it. Teaching instruments that are only 20 years old are so obsolete that we literally laugh at them now.
I recall that when I was in high school it was nothing more than an "interesting coincidence" that the western outline of Europe/Africa and the eastern outline of the Americas were so similar.
I cannot concieve that anything technological is going to be used "as is" for "100 years or more."
Exactly what i was thinking
In fact, i was just reading this snippet from and article i read
Mark
In fact, i was just reading this snippet from and article i read
I wonder what version of PHP we will be on when they introduce a brain_connect() function.Search Pets. Google representative Craig Silverstein offered his bizarre vision of the future of search during one Search Engine Strategies session. In a speech closely resembling a Star Trek episode, he shared his new prediction of search moving towards the existence of search pets hundreds of years from now. These search pets would not necessarily be like a pet dog, but more like "a genetically engineered beast."
Adding to the science fiction, he believes search pets will be able to understand emotions and allow people to search for things that aren't necessarily facts.
Helping increase and enhance communication, search pets will understand the way the world works and the way humans interact. Search pets will be able to determine and untangle what searchers mean politically and socially.
Google Brain Implants? If the search pets aren’t far out enough for you, Silverstein also shared his believe that search function brain implants may be in store in the distant future. Hundreds of years from now, the world of search as we know it will be completely redefined.
"We'll still search for facts," he says, "but in all likelyhood the facts will be contained in a brain implant."
Hmmm… so, how would you feel about having Google implanted into your brain?
Mark
Last edited by JayBird on Fri Mar 05, 2004 9:53 am, edited 1 time in total.
...Also, another few quotes
Chairman of IBM wrote:In 1943 the Chairman of IBM, Thomas Watson predicted...
I think there is a world wide market for maybe five computers.
MarkBill Gates wrote:Bill Gates was reported as saying... 640k should be enough for anyone.
This was the size of the memory in the earlier IBM Personal Computers.
- Pyrite
- Forum Regular
- Posts: 769
- Joined: Tue Sep 23, 2003 11:07 pm
- Location: The Republic of Texas
- Contact:
See, I don't care about all the politics, and all this theory talk. I don't care, I care about php.
Ps. The Adodb Date Library works! Works with later dates in 1901 and on WindowsXP, up till Jan 19th, 2038, so I don't know why that isn't working, the page says dates up to or past the year 3000, but I dunno. I suspect that I'll just cross that bridge when I come to it, after all, in 2038 if Windows is still around, this stupid date bug will probably be fixed. The use of dates prior to 1970 was really critical for me for now.
Setlocale works with dates that were created with adodb_mktime() using the strftime function, but only for dates >= 1970. The ones before, the adodb_date function doesn't seem to consider setlocale, still playing with it though.
Ps. The Adodb Date Library works! Works with later dates in 1901 and on WindowsXP, up till Jan 19th, 2038, so I don't know why that isn't working, the page says dates up to or past the year 3000, but I dunno. I suspect that I'll just cross that bridge when I come to it, after all, in 2038 if Windows is still around, this stupid date bug will probably be fixed. The use of dates prior to 1970 was really critical for me for now.
Setlocale works with dates that were created with adodb_mktime() using the strftime function, but only for dates >= 1970. The ones before, the adodb_date function doesn't seem to consider setlocale, still playing with it though.