Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-08-2006, 05:44 PM   #1
Member (8 bit)
 
Join Date: Jul 2005
Location: Goshen, NY
Posts: 133
Display Local time of User on Web Page

Quite some time ago, after gathering many bookmarks of Computer Talk Radio shows, I put together a web site listing those shows. I currently have the shows that stream listed hourly, using US Eastern Time. Is there a way the local user could insert his time zone and have the hourly listings change accordingly. http://www.angelfire.com/rnb/moodybl.../indexsat.html

This is my first and only attempt at a web site and the fact of the matter is, this started out as a template. I have learned quite a bit, but just enough to get by. The page barely resembles the original template, but it also is not as slick as many of the sites that are professionally put together. My main goal was to make a consolidate listing of Computer Radio shows that stream, and hopefully keep the info current and easy to navigate. The time zone thing has bothered me ever since I put this together 4 or 5 years ago, but I have never found a good solution, other than the inclusion of world times at the top of the page.

Thoughts or suggestions would be appreciated.
moodyblues100 is offline   Reply With Quote
Old 11-10-2006, 12:13 AM   #2
Foldin' For PCMech!
 
enhanced08's Avatar
 
Join Date: Jun 2003
Location: back home in McHenry MD
Posts: 1,657
Send a message via AIM to enhanced08 Send a message via MSN to enhanced08
I would think it would have to be done in either Javascript or with PHP. I dont remember if geocities has php or not so javascript might be your best bet. As for the actual script, I cant help ya there, i'm no programmer!
__________________
Eric
Help save lives! Click Here
AMD 4800+ X2 @ 2750Mhz (250 x 11) | DFI LanParty UT CFX3200 | 2GB Mushkin pc4000 3-3-2-8 1:1
Sapphire X1900GT 256MB | (2) 150GB Raptors RAID0 | WD 320GB
enhanced08 is offline   Reply With Quote
Old 11-10-2006, 05:34 AM   #3
Member (8 bit)
 
Join Date: Jul 2005
Location: Goshen, NY
Posts: 133
I have been searching sites for some script, but the best I could find was putting up the current time in several time zones. I would like to have the visitor choose their local time zone and automatically have the hourly listings updated to reflect their time zone rather than the Eastern time I have it listed as.

I am no programmer also, so I would not even know where to start writing some script. Thanks for the response though.
moodyblues100 is offline   Reply With Quote
Old 11-10-2006, 07:19 AM   #4
~ Ryan ~
 
Join Date: Jun 2005
Location: Jackson TN
Posts: 3,516
Send a message via AIM to rspassey Send a message via MSN to rspassey
PHP Code:
            <script type="text/javascript">
            var 
now = new Date();
            
document.write(now);
</script> 
I'm not sure whether this will change according to time zone (never had a chance to try it out), but it might work.
__________________
RiotCats.com, an internet domain specifically fabricated and visually erected for the appreciation of the feline kingdom!
rspassey is offline   Reply With Quote
Old 11-10-2006, 07:43 AM   #5
Come in Ray...
 
faulkner132's Avatar
 
Join Date: Sep 2004
Posts: 1,668
Javascript might work for what you want to do, but PHP is going to be a better fit.

Put a drop down on your form with the value attribute equal to the number of hours to adjust the time respective to the server (1, 2, -1, 0, etc.) and the display value equal to the time zone name (Eastern, Central, etc.).

Then your PHP code would look something like this:

PHP Code:
// current time in the selected time zone in format HH:MM:SS [AM/PM]
$time date'h:i:s A'date() + ($_POST['timezone_dropdown'] * 3600) ); 
From here you could adjust accordingly.
faulkner132 is offline   Reply With Quote
Old 11-10-2006, 03:52 PM   #6
Member (8 bit)
 
Join Date: Jul 2005
Location: Goshen, NY
Posts: 133
Thanks for the replies. As I mentioned previously, I am no wiz when it comes to code for a web page. With regard to the PHP code, I am a little unclear about exactly how to lay out this dropdown box. My ultimate goal is to adjust the hourly listings on the page to the corresponding local time. For example, I currently have it listed by Eastern time, where it currently states the shows that stream at say 1:00. I would like someone in the Central time zone to automatically display 12:00 (or the appropriate time for any time zone) How, if at all , will this drop down achieve that?

Last edited by moodyblues100; 11-10-2006 at 04:11 PM.
moodyblues100 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer Acronyms Floppyman Computer Hardware 156 06-18-2006 06:25 AM
Windows services list snooker Windows Legacy Support (XP and earlier) 0 06-27-2004 11:05 PM
Web Page e-mail issues DanHocker Web Design / Development 0 04-25-2003 03:41 PM
Web page help Planenuts Internet, Web Applications, & The Cloud 9 02-22-2003 10:52 AM
Building my first web page FireStick Internet, Web Applications, & The Cloud 9 12-23-2002 09:32 AM


All times are GMT -5. The time now is 05:15 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2