Click here to Skip to main content
15,887,477 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Richard Deeming31-Mar-17 8:41
mveRichard Deeming31-Mar-17 8:41 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Super Lloyd31-Mar-17 8:56
Super Lloyd31-Mar-17 8:56 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Richard Deeming31-Mar-17 8:58
mveRichard Deeming31-Mar-17 8:58 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Super Lloyd31-Mar-17 10:12
Super Lloyd31-Mar-17 10:12 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Plamen Dragiyski30-Mar-17 20:19
professionalPlamen Dragiyski30-Mar-17 20:19 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Jochen Arndt30-Mar-17 21:05
professionalJochen Arndt30-Mar-17 21:05 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
bvgheluwe31-Mar-17 0:12
bvgheluwe31-Mar-17 0:12 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Jochen Arndt31-Mar-17 0:31
professionalJochen Arndt31-Mar-17 0:31 
It all depends on the requirements.

If you need time zone information, you must pass it too of course. If you don't need the TZ name, using the offset is fine because that can be simply parsed. If you need the name do not use the full name but the abbreviation (see List of time zone abbreviations - Wikipedia[^]).

Handling local times is always a nightmare. For this reason there is the general rule to always use UTC. Only when dates should be displayed they might be converted to local time.

When having tabular data containing multiple records, use UTC for the records and store the time zone information in a single record (e.g. within the user record). This applies especially when the timestamps has to be stored in binary format (like with databases).
GeneralRe: Microsoft, Javascript and not cutting corners Pin
englebart31-Mar-17 3:36
professionalenglebart31-Mar-17 3:36 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Brady Kelly31-Mar-17 4:52
Brady Kelly31-Mar-17 4:52 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Kirk 1038982131-Mar-17 4:52
Kirk 1038982131-Mar-17 4:52 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
DerekT-P31-Mar-17 11:02
professionalDerekT-P31-Mar-17 11:02 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Kirk 1038982131-Mar-17 11:20
Kirk 1038982131-Mar-17 11:20 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
James Curran31-Mar-17 15:08
James Curran31-Mar-17 15:08 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Herbie Mountjoy3-Apr-17 0:16
professionalHerbie Mountjoy3-Apr-17 0:16 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
EveryNameIsTakenEvenThisOne12-Apr-17 21:24
professionalEveryNameIsTakenEvenThisOne12-Apr-17 21:24 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
DerekT-P15-Apr-17 9:43
professionalDerekT-P15-Apr-17 9:43 
AnswerISO 8601 Pin
sx200813-Apr-17 13:29
sx200813-Apr-17 13:29 
GeneralThe new Trump Two Dollar Bill Pin
James Lonero20-Mar-17 9:31
James Lonero20-Mar-17 9:31 
GeneralRe: The new Trump Two Dollar Bill Pin
Brisingr Aerowing20-Mar-17 12:24
professionalBrisingr Aerowing20-Mar-17 12:24 
GeneralRe: The new Trump Two Dollar Bill Pin
dlhale23-Mar-17 19:10
dlhale23-Mar-17 19:10 
GeneralRe: The new Trump Two Dollar Bill Pin
WiganLatics24-Mar-17 2:29
professionalWiganLatics24-Mar-17 2:29 
GeneralRe: The new Trump Two Dollar Bill Pin
dlhale24-Mar-17 6:02
dlhale24-Mar-17 6:02 
GeneralRe: The new Trump Two Dollar Bill Pin
WiganLatics24-Mar-17 7:07
professionalWiganLatics24-Mar-17 7:07 
GeneralRe: The new Trump Two Dollar Bill Pin
dlhale24-Mar-17 8:05
dlhale24-Mar-17 8:05 

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.