The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Changing date?
I know I have the oddest requests but here goes
I want the year (2004) to be + 120 so that it's 2124 today. Is that possible and how would I do that? The reason is I run an RPG that takes place in the future, and I want that role playing feeling to go throughout the entire site Thanks :ninja: |
#2
|
||||
|
||||
Quote:
|
#3
|
||||
|
||||
As Colin said, if you wish it to effect all of vB's dates then editing vbdate() would e easiest (and would allow for the real date to be used in the future if wanted).
You'd need to add the number of seconds that 120 years is to the dateline generated (or collected from the database), its around 3784320000 seconds not including any leap years. |
#4
|
||||
|
||||
Now that I think about it, you might have some problems with the unix timestamp limitation of 2038...
|
#5
|
||||
|
||||
Try adding this:
PHP Code:
$timestamp_adjusted = max(0, $timestamp - $hourdiff); |
#6
|
||||
|
||||
I hope this is just for the year Thanks I'll definately try it and let you know how it goes
|
#7
|
||||
|
||||
No go, it changed my times to
1969 :X yikes! 12-31-1969 02:59 PM was today Also, none of them showed "Today" and "Yesterday" -- not too big of a deal to me but any suggestions? |
#8
|
||||
|
||||
Well, that's probably due to the problem I mentioned above with the limitation of unix timestamps.
I have an idea... I'll get back to you |
#9
|
||||
|
||||
Sorry, didn't think of everything
My idea was to split the last date and change the year before returning it, but you can't do that because you don't know how the date is formatted. |
#10
|
|||
|
|||
You could restrict the function from getting the year in the dateline at all, then apply a hard-coded year to the end of the date.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|