File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ranch Office and the fly likes local time display in forum Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "local time display in forum" Watch "local time display in forum" New topic
Author

local time display in forum

David Balažic
Ranch Hand

Joined: May 15, 2008
Posts: 89
Hi!

I see times are displayed in , I quote "All times above are in your local time zone & format.The current ranch time (not your local time) is Sep 30, 2011 07:42:45."

This is really great!
It works and requires zero settings from the user (time zone, daylight savings...) like on some other forums.

I would just suggest to also print the current time in users zone and format, just to see if it really computes the correct time.

Something like:
All times above are in your local time zone & format.The current ranch time is Sep 30, 2011 07:42:45, your local time is Sep 30, 2011 15:42:45.


But it is a small thing, the time display above, on the page is the big thing!
Really glad to see it !

David
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19785
    
  20

Can't you just check your system tray?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

David Balažic wrote:
I would just suggest to also print the current time in users zone and format, just to see if it really computes the correct time.

When you make a post, the time is displayed on the post (like on the first post of this thread). You can compare that with your system time if you want to verify it.

[My Blog] [JavaRanch Journal]
David Balažic
Ranch Hand

Joined: May 15, 2008
Posts: 89
Rob Spoor wrote:Can't you just check your system tray?

What does my system tray say about the correctness of forum code?
David Balažic
Ranch Hand

Joined: May 15, 2008
Posts: 89
Jaikiran Pai wrote:
David Balažic wrote:
I would just suggest to also print the current time in users zone and format, just to see if it really computes the correct time.

When you make a post, the time is displayed on the post (like on the first post of this thread). You can compare that with your system time if you want to verify it.

Yes, but that would make me spam the forum. ;)
I just thought that the forums idea of my local time would be a more useful information than the ranch time.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18991
    
    8

David Balažic wrote:
Rob Spoor wrote:Can't you just check your system tray?

What does my system tray say about the correctness of forum code?


Your system tray is the quick way for you to test the correctness of the forum code. The slow way would be for you to wait for somebody here to agree that it would be a good thing to change the forum software so you could do the test you suggested.

I don't think that we're likely to make that change, since (as far as I know) so far nobody has complained that the forum is displaying incorrect times for them. Which sort of suggests that people are happy with the way it displays their local time, and that they don't need additional confirmation that it's working right.
David Balažic
Ranch Hand

Joined: May 15, 2008
Posts: 89
Paul Clapham wrote:
Your system tray is the quick way for you to test the correctness of the forum code.

I might be slow.
My tray says 22:14.
That does not tell me anything about the forum code. (because it is independent of it).


Besides, this was a minor suggestion.
The important thing is the whole thing was implemented. I can hardly wait until all websites use something like this.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11525
    
100

This is an interesting idea, and should be relatively easy to implement. The only downside I see is that the bottom section is already taking up a lot of real-estate. Any thoughts on wording that will allow us to have both the local and ranch time without taking up too much more space?


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11525
    
100

Thinking out loud:
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11499
    
  16

just out of curiosity, what would you gain if they differ from each other? How would you know if we were computing the wrong ranch time, the wrong local time, or both?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
David Balažic
Ranch Hand

Joined: May 15, 2008
Posts: 89
If by "you" you mean the person visiting the web page:

"what would you gain if they differ from each other?"
Again, assuming you mean by "they" the displayed local time and the actual local time (which the user can determine by looking at the systray or his wristwatch):
I gain the knowledge, that all times on the page are off by a certain offset (zero, ideally).


"How would you know if we were computing the wrong ranch time, the wrong local time, or both?"
For local time: see above.
For ranch time:
- what "computing" does it involve?
- I don't see why a random web visitor would care about ranch time. (not saying there is no reason, just for me it is not an important information)
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11499
    
  16

One reason you may care is that sometimes when we do upgrades or make changes, we'll say "we will be down from X to Y, Ranch time".

And I still fail to see what difference it makes if the time is off by 2 seconds or 5 minutes. I don't think we sync to the atomic clock in any case.

Again, if they differ (ranch time vs. local time vs. system tray time vs. wristwatch time), which one is wrong?

Personally, I don't care if the change is made or not. I just don't see what the benefit is, and I do like to have friendly discussions/debates.
David Balažic
Ranch Hand

Joined: May 15, 2008
Posts: 89
fred rosenberger wrote:One reason you may care is that sometimes when we do upgrades or make changes, we'll say "we will be down from X to Y, Ranch time".

Well.... That could say the time in local time, could it not? ;)

And I still fail to see what difference it makes if the time is off by 2 seconds or 5 minutes. I don't think we sync to the atomic clock in any case.

I was thinking more about errors in the hours range.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11499
    
  16

David Balažic wrote:Well.... That could say the time in local time, could it not? ;)

not if i make an announcement thread in this forum, and say "The ranch will be down from 8-12 ranch time tomorrow"...

unless I say
The ranch will be down from 8-12 ranch time tomorrow
which is:7-11 central, 6-10 eastern...
David Balažic
Ranch Hand

Joined: May 15, 2008
Posts: 89
Yeah, you could say 14 hours UTC or similar...

Or you could use a new (not yet existing) forum tag, that converts the time you enter into local time, like it does for the post times... ;)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: local time display in forum