Previous Thread
Next Thread
Print Thread
Hop To
#135865 09/27/2000 9:04 AM
Anonymous
Unregistered
Anonymous
Unregistered
At the bottom of the main page, where it says "All times are PST" (on Scream's board), it might be good to print the current time as seen by the server (e.g. 3:00pm PST) so that users could see how much their time zone is shifted so they can mentally adjust the post times.

Bill Dimm, <A HREF="http://MagPortal.com/" target="_new">MagPortal.com</A> - find magazine articles

#135866 09/27/2000 9:42 AM
Anonymous
Unregistered
Anonymous
Unregistered
How about, thinking along those lines, letting users enter a GMT offset of where THEY are, and let the board calculate everything according to where THEY are?

e.g., if I am in CA, and post something at 09:00am, and someone in NY looks at it, let it tell them it was posted at 12noon.

Date::Manip package would work beautifully there

#135867 09/27/2000 11:34 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
I took a look at Date::Manip and two things from the authors manual that I didn't like. Slow and one of the largest CPAN modules around. As much as the date command is used when building pages this probably wouldn't be a good idea.

I would like to provide this feature. Probably the easiest way would be to have an offset in your profile. So it would look something like:

Server time is 12:37 PM. Choose your time offset in hours (...,-2,-1,0,1,2,...)

And then all dates would reflect your personal time offset. But I'm not sure that is very intuitive.

---
Scream
<A HREF="http://www.wcsoft.net" target="_new">http://www.wcsoft.net</A>

#135868 09/27/2000 11:35 AM
Anonymous
Unregistered
Anonymous
Unregistered
This was discussed a while ago <A HREF="http://www.wwwthreads.com/perl/showthreaded.pl?Cat=&Board=wishlist&Number=18654&page=&view=&sb=&vc=1#Post18654" target="_new">here</A>. One thing that could get confusing is that I think daylight savings time causes the difference between the local time zone and GMT to not be constant. Daylight savings time does not start (or was it end?) at the exact same time in Europe and the US - quite a mess.

Bill Dimm, <A HREF="http://MagPortal.com/" target="_new">MagPortal.com</A> - find magazine articles

#135869 09/27/2000 12:26 PM
Anonymous
Unregistered
Anonymous
Unregistered
>>Server time is 12:37 PM. Choose your time offset in hours (...,-2,-1,0,1,2,...)

And then all dates would reflect your personal time offset. But I'm not sure that is very intuitive.<<

They'll have to do it the "guess and verify" way we Administrators do it now. grin
I also think chosing the offset from GMT would be better - most people already know that for their local time.
<img src="http://www.amdragon.com/images/eileensig.gif" alt=" - " />

#135870 09/27/2000 1:19 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
In order to use a GMT offset this would require a GMT offset variable in w3tvars.pm and then one in the user profile. This actually wouldn't be too difficult as all the calculations would be in the convert time function. But, part of setup would be to figure out the GMT offset of where your server is located. So for instance, in my case I would put in -7 for this variable. Does this sound too complicated?

The only problem with running everything off of GMT is the daylight savings time issue. Whereas if you use the standard time call, daylight savings is already taken into consideration when reporting the time back.

---
Scream
<A HREF="http://www.wcsoft.net" target="_new">http://www.wcsoft.net</A><P ID="edit"><FONT SIZE=-1><EM>Edited by Scream on 9/27/00 10:25 AM.</EM></FONT>

#135871 09/27/2000 1:32 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Going back to my original thought of a standard offset against the server time it really wouldn't be a guess if the date and time were displayed right above the form box for the offset.

Meaning, if you saw

Current server time is Tuesday, September 27 12:37 PM

Then you could look at your clock and see what offset you need. Trying to deal with GMT and daylight savings would be a cludge at best and still may not work for all timezones. Whereas a simple time offset would be quite simple.

---
Scream
<A HREF="http://www.wcsoft.net" target="_new">http://www.wcsoft.net</A>

#135872 09/27/2000 1:48 PM
Anonymous
Unregistered
Anonymous
Unregistered
Yes, of course, you're right. I'd forgotten how I keep having to change my 'guess' to allow for Daylight Saving. Let's go with a standard offset against the server time displayed right above the form box for the offset.

<img src="http://www.amdragon.com/images/eileensig.gif" alt=" - " />

#135873 09/27/2000 2:39 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Ok, this is done on the devel site. In your display preferences you can choose your offset. On the main page where it used to show the server timezone it shows the current time with your offset in place. And everywhere a date/time is displayed it takes your offset into consideration.

---
Scream
<A HREF="http://www.wcsoft.net" target="_new">http://www.wcsoft.net</A><P ID="edit"><FONT SIZE=-1><EM>Edited by Scream on 9/27/00 11:58 AM.</EM></FONT>

#135874 09/27/2000 2:57 PM
Anonymous
Unregistered
Anonymous
Unregistered
That works for me. <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

<img src="http://www.amdragon.com/images/eileensig.gif" alt=" - " />

#135875 09/28/2000 3:24 AM
Anonymous
Unregistered
Anonymous
Unregistered
Looks good to me. You might consider making "your offset" into a link to either the display preferences (only works if they are logged in of course) or a small explanation page.

Bill Dimm, <A HREF="http://MagPortal.com/" target="_new">MagPortal.com</A> - find magazine articles

#135876 09/27/2000 7:19 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Good Idea. I just stuck a link in to go to editdisplay when clicking on this.

---
Scream
<A HREF="http://www.wcsoft.net" target="_new">http://www.wcsoft.net</A>

#135877 09/27/2000 11:11 PM
Anonymous
Unregistered
Anonymous
Unregistered
Nice. At Amdragon I put a link to a personalized <A HREF="http://www.timeanddate.com/worldclock/" target="_new">World Clock</A> so they can compare (selected) times across the world.

<img src="http://www.amdragon.com/images/eileensig.gif" alt=" - " />

#135878 10/04/2000 1:14 PM
Anonymous
Unregistered
Anonymous
Unregistered
I am somewhat late on this thread because of my server change but if I may still have a say...
Id suggest going one step further in the
<font color=blue>Current server time is: Wed Oct 4 09:58:30 2000
Choose your time offset in hours (..,-2,-1,0,1,2,..)</font color=blue>
thing:

Instead of that, why not have a select list of times, something like:

<font color=red>What time is it where you are at? [select list].</font color=red>

That is..:
<form>
<select name="select">
<option value="-1">Oct 4 08:58:30</option>
<option value="+0" selected>Oct 4, 09:58:30</option>
<option value="+1">Oct 4, 10:58:30</option>
<option value="+2">Oct 5, 11:58:30</option>
</select>
</form>

and so on...

Mateo Byler
CruceDeCaminos.com - <A HREF="http://crucedecaminos.com" target="_new">http://crucedecaminos.com</A>

#135879 10/04/2000 2:27 PM
Anonymous
Unregistered
Anonymous
Unregistered
Good idea.

<img src="http://www.amdragon.com/images/eileensig.gif" alt=" - " />

#135880 10/08/2000 1:28 PM
Anonymous
Unregistered
Anonymous
Unregistered
I do like the offset date thing, saves my poor wee brain from doing any maths.
Notice I said "maths" rather than "math". Yup, I'm a Brit, and your month/day/year date system gives me much more of a headache than adding a few hours onto the time in 24hr clock.
So I'm asking for an option in Display Preferences to display the time in DMY format. That would, in the words of Graham Greene's novel Brighton, rock

Did you know? You can use old motor oil to fertilise your lawn.

#135881 10/09/2000 3:16 AM
Anonymous
Unregistered
Anonymous
Unregistered
Yes, that would be nice... but either way, I'm excited about this feature! <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

Muhammad Chishti
Creative dIRECTOR
<font color=white><A HREF="http://www.imcuniverse.com" target="_new">http://www.imcuniverse.com</A></font color=white>

#135882 10/10/2000 11:31 AM
Anonymous
Unregistered
Anonymous
Unregistered
We use this new 'short4' called more european-friendly time format: MM-DD-YY 24:00:
simply make the following additions to w3t.pm / convert_time and check 'short4' in w3ttheme.pm:
(new code between #>>>)

sub convert_time {
...
my ($hour,$min,$sec)=split(/:/,$tarray[3]);

#>>> new $hour24
my $hour24=$hour;
#>>>
...
elsif ($theme{'timeformat'} eq "short3") {
$time="$year/$months{$tarray[1]}/$tarray[2] $hour:$min $AMPM";
}

#>>> new format "short4": MM-DD-YY 24:00
elsif ($theme{'timeformat'} eq "short4") {
if ($months{$tarray[1]}<10) {
$months{$tarray[1]}="0$months{$tarray[1]}";
}
if ($tarray[2]<10) {
$tarray[2]="0$tarray[2]";
}
$time="$months{$tarray[1]}-$tarray[2]-$year $hour24:$min";
}
#>>>
...

#135883 10/10/2000 12:17 PM
Anonymous
Unregistered
Anonymous
Unregistered
I'm in the interesting position of being BOTH a Brit AND an Naturalized Colonial Upstart so I go with the recommended Universal format. This is what I have:

In w3t.pm:

###########################################################################
# convert_time: converts the time to a useable format
###########################################################################
sub convert_time {

my $time = shift;
$time = localtime($time);
if($theme{'timeformat'} =~/^short/) {

my @tarray = split(/ +/,$time);
my %months = (
"Jan" => 1,
"Feb" => 2,
"Mar" => 3,
"Apr" => 4,
"May" => 5,
"Jun" => 6,
"Jul" => 7,
"Aug" => 8,
"Sep" => 9,
"Oct" => 10,
"Nov" => 11,
"Dec" => 12
);
my $year = substr($tarray[4],2,2);
my ($hour,$min,$sec) = split(/:/,$tarray[3]);
my $AMPM;

if ($theme{'timeformat'} ne "short4") {
if ($hour >= 12) {
$AMPM = "PM";
if ($hour > 12) {
$hour = $hour-12;
if ($hour < 10) {
$hour = "0$hour";
}
}
} else {
$AMPM = "AM";
}
}

my $day = $tarray[2];
if ($day < 10) {
$day = "0$day";
}

my $month = $months{$tarray[1]};
if ($month < 10) {
$month = "0$month";
}


if ($theme{'timeformat'} eq "short1") {
# $time = "$months{$tarray[1]}/$tarray[2]/$year $hour:$min $AMPM";
$time = "$month/$day/$year $hour:$min $AMPM";
}
elsif ($theme{'timeformat'} eq "short2") {
# $time = "$tarray[2]/$months{$tarray[1]}/$year $hour:$min $AMPM";
$time = "$day/$month/$year $hour:$min $AMPM";
}
elsif ($theme{'timeformat'} eq "short3") {
# $time = "$year/$months{$tarray[1]}/$tarray[2] $hour:$min $AMPM";
$time = "$year/$month/$day $hour:$min $AMPM";
}
elsif ($theme{'timeformat'} eq "short4") {
# $time = "$year/$months{$tarray[1]}/$tarray[2] $hour:$min";
$time = "$year/$month/$day $hour:$min";
}

}
return $time;

}

In w3ttheme.pm:

# Which time format to use. The short format is Y2K compliant <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />
# long = 'Sun Mar 7 13:19:48 1999';
# short1 = 'MM/DD/YY 01:19 PM';
# short2 = 'DD/MM/YY 01:19 PM';
# short3 = 'YY/MM/DD 01:19 PM';
# Scream's short4 was = 'DD/MM/YYYY 10:19';
# but My short4 = 'YY/MM/DD 13:19';
$theme{'timeformat'} = 'short4';


<img src="http://www.amdragon.com/images/eileensig.gif" alt=" - " />

#135884 10/10/2000 11:20 PM
Anonymous
Unregistered
Anonymous
Unregistered
M/D/Y is total bollocks as you Brits would say but who am I to argue with 250 million Yanks. Maybe that can be next on the list after they finally get rid of fractions on the stock exchange.

Regarding BillD's original question, I used to display the time on the server in a little frame refreshing every couple of minutes. The script was called TimeIt, you can grab it from <A HREF="http://thecgipath.hypermart.net/products/s_timeit.html" target="_new">http://thecgipath.hypermart.net/products/s_timeit.html</A>. If you want to include the time in your perl script it would be easy to do by picking the important bits out of TimeIt and including it in the perl script. The number of different formats you can use to display time/date is the real benefit of TimeIt.

Darren.
<A HREF="http://www.bullpen.com.au" target="_new">http://www.bullpen.com.au</A>


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Nightcrawler), 546 guests, and 171 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)