Click here to Skip to main content
15,896,606 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: It's about TIME for a programming question Pin
Clifford Nelson28-Jul-16 5:28
Clifford Nelson28-Jul-16 5:28 
GeneralRe: It's about TIME for a programming question Pin
WiganLatics28-Jul-16 5:12
professionalWiganLatics28-Jul-16 5:12 
GeneralRe: It's about TIME for a programming question Pin
Marc Clifton28-Jul-16 5:19
mvaMarc Clifton28-Jul-16 5:19 
GeneralRe: It's about TIME for a programming question Pin
patbob28-Jul-16 5:46
patbob28-Jul-16 5:46 
GeneralRe: It's about TIME for a programming question Pin
ledtech328-Jul-16 6:15
ledtech328-Jul-16 6:15 
AnswerRe: It's about TIME for a programming question Pin
Jeremy Falcon28-Jul-16 6:38
professionalJeremy Falcon28-Jul-16 6:38 
GeneralRe: It's about TIME for a programming question Pin
Pablo Aliskevicius28-Jul-16 6:44
Pablo Aliskevicius28-Jul-16 6:44 
GeneralRe: It's about TIME for a programming question Pin
Ryan Peden28-Jul-16 6:55
professionalRyan Peden28-Jul-16 6:55 
In all the scenarios, I'd store the UTC time. And in all cases, I'm assuming you're working in a language that has a decent date/time library available. Ideally it will use something like these time zone ids that are hopefully granular enough to help sort out DST oddities like Indiana (and lots of others).

Scenario 1
In the blog's admin section, have a local time zone setting. If there's an admin user logged in, display the blog entry time in the blog's local time zone. So if you travel from NY to CA, if you go to you blog on your laptop and your admin cookie hasn't expired, you'll see the entries in your home time zone.

Scanario 2
For non-admin users, show the time in their local time zone. This shouldn't be too hard server-side if you can deduce location from their IP. If you can't, and you're lazy, and you absolutely don't ever want to show post times in the blog's 'home' time zone to users in other time zones, add <div class='post-date' data-utcmillis='12345'></div> to every entry, where data-utcmiliis is set to the number of milliseconds since Jan 1, 1970 UTC. On page load, use JavaScript to populate the date fields. The JS Date object has a Date(millis) constructor, so you can instantiate one with the UTC milliseconds value and use that to generate a local date string. So the user will either see the post date in their computer's time zone, or if they have JS disabled they'll see no date at all.

Scenario 3
Since the ATMs and branches have specific geographic locations, it's easy to localize transactions. In the case of the no receipt, no cash transaction, I think it makes sense for the customer service rep to ask the customer where it occurred, when it occurred, and the amount of cash the machine should have dispensed. Customer service needs at least some information to determine place and/or time of the transaction. Even an answer like "Last night, in New York, for $50 or $100" or "$250, some time in the past couple of days" would be enough to get started. Start the search based on the customer's card number and pull up the last 25 or 50 transactions. The where/when/amount questions will help the rep quickly scan the list for any transactions matching the customer's description. If the customer can't provide any of these details then they likely need more help than an ATM company's customer service rep can provide. Smile | :)

It probably makes sense to display the transaction's local time and location, so the customer service rep can say "I see a withdrawal for $50 last night at 9:24PM from an ATM at 123 XYZ St. in lower Manhattan" without needing to do any mental time zone conversions.
JokeRe: It's about TIME for a programming question Pin
Nish Nishant28-Jul-16 7:49
sitebuilderNish Nishant28-Jul-16 7:49 
GeneralRe: It's about TIME for a programming question Pin
Marc Clifton28-Jul-16 9:16
mvaMarc Clifton28-Jul-16 9:16 
GeneralRe: It's about TIME for a programming question Pin
Worried Brown Eyes28-Jul-16 11:32
Worried Brown Eyes28-Jul-16 11:32 
GeneralRe: It's about TIME for a programming question Pin
Gaston Verelst28-Jul-16 20:27
Gaston Verelst28-Jul-16 20:27 
GeneralRe: It's about TIME for a programming question Pin
rnbergren29-Jul-16 2:50
rnbergren29-Jul-16 2:50 
GeneralRe: It's about TIME for a programming question Pin
Kirk 1038982129-Jul-16 6:03
Kirk 1038982129-Jul-16 6:03 
GeneralRe: It's about TIME for a programming question Pin
Steven121829-Jul-16 7:00
professionalSteven121829-Jul-16 7:00 
GeneralRe: It's about TIME for a programming question Pin
Gerry Schmitz30-Jul-16 0:30
mveGerry Schmitz30-Jul-16 0:30 
GeneralRe: It's about TIME for a programming question Pin
H.Brydon30-Jul-16 10:05
professionalH.Brydon30-Jul-16 10:05 
GeneralWhen did you last turn this thing on? Pin
OriginalGriff28-Jul-16 2:42
mveOriginalGriff28-Jul-16 2:42 
GeneralRe: When did you last turn this thing on? Pin
Daniel Pfeffer28-Jul-16 3:03
professionalDaniel Pfeffer28-Jul-16 3:03 
GeneralRe: When did you last turn this thing on? Pin
#realJSOP28-Jul-16 3:44
professional#realJSOP28-Jul-16 3:44 
GeneralRe: When did you last turn this thing on? Pin
dandy7228-Jul-16 4:01
dandy7228-Jul-16 4:01 
General!@#$^%#$(#$@#$#@! Pin
Kornfeld Eliyahu Peter28-Jul-16 2:36
professionalKornfeld Eliyahu Peter28-Jul-16 2:36 
GeneralRe: !@#$^%#$(#$@#$#@! Pin
W Balboos, GHB28-Jul-16 2:40
W Balboos, GHB28-Jul-16 2:40 
GeneralRe: !@#$^%#$(#$@#$#@! Pin
OriginalGriff28-Jul-16 2:43
mveOriginalGriff28-Jul-16 2:43 
GeneralRe: !@#$^%#$(#$@#$#@! Pin
W Balboos, GHB28-Jul-16 2:45
W Balboos, GHB28-Jul-16 2:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.