This is a discussion on "Adjusting time from server time to local time" within the Classic ASP section. This forum, and the thread "Adjusting time from server time to local time are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Adjusting time from server time to local time
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
Adjusting time from server time to local time
I've been using
How can I adjust the display time? |
|
|
|
|||
|
I guess you could always subtract (or add may depending on the case...) your time with the server time. Then display that.
|
|
|||
|
You mean, you want it to display relative to the time on the client side?
The only way I can think of doing that is with a Javascript, which is fed your time zone and works out the time on the client machine. |
|
|||
|
I think Court Jester has a point, if you know the time difference between you and the server, just subtract the appropriate amount of hours...
If England hadnt lost last night and I hadnt got so drunk, i wouldnt be feeling so ill today and i might have written the code to do this but, in my current state, i cant! |
|
||||
|
I've tried adding the appropriate amount of hours (17 to be exact), but I keep having problems. I can get it to do it, but then the date is still yesterday... and then I have the problem of converting it to 12 hour clock:
but when the server time is 10am, add 17 hours, becomes 27:00, minus 12 hours, 15:00... no no no... I gues I could add more if statements there (if xtime > 20 then...). I'll give that a go tomorrow. It's 12am here almost, so I'm going to bed, I was up til 2am last night doing this... My brain is too messed up, need sleep. |
|
|||
|
|
|
||||
|
lol smokie.
your one-liners crack me up. However Smokie, as a great teacher of coding practice, I'm sure you meant:-
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
THAT A BOY ROB!!!! LOL
|
|
|||
|
blame Microsoft...
|
![]() |
| Tags |
| adjusting, time, server, local |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My first time | jabo | Introduce Yourself | 3 | Feb 26th, 2008 17:33 |
| sorry, need more help with time | saltedm8 | PHP Forum | 12 | Oct 6th, 2007 21:04 |
| Ok you get this all the time... | Docherty | Web Page Design | 6 | Nov 19th, 2005 14:55 |
| Server time and date script | gribble | JavaScript Forum | 1 | Aug 16th, 2005 09:53 |
| What's the time? | Rob | JavaScript Forum | 2 | Sep 25th, 2003 18:01 |