Click here to Skip to main content
14,265,797 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
bvgheluwe31-Mar-17 0:12
memberbvgheluwe31-Mar-17 0:12 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Jochen Arndt31-Mar-17 0:31
mveJochen Arndt31-Mar-17 0:31 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
englebart31-Mar-17 3:36
memberenglebart31-Mar-17 3:36 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Brady Kelly31-Mar-17 4:52
memberBrady Kelly31-Mar-17 4:52 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
Kirk 1038982131-Mar-17 4:52
memberKirk 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
memberKirk 1038982131-Mar-17 11:20 
GeneralRe: Microsoft, Javascript and not cutting corners Pin
James Curran31-Mar-17 15:08
memberJames Curran31-Mar-17 15:08 
Why are you screwing around with strings?

In Javascript "Date.now()" returns the number of milliseconds since 1/1/1970 (GMT). Pass that number in the URL.

On the server-side:
new DateTime(1970,1,1) + new TimeSpan(now * 1000)

Give you the date/time.
Truth,

James

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
membersx200813-Apr-17 13:29 
GeneralThe new Trump Two Dollar Bill Pin
James Lonero20-Mar-17 9:31
memberJames 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
memberdlhale23-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
memberdlhale24-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
memberdlhale24-Mar-17 8:05 
GeneralRe: The new Trump Two Dollar Bill Pin
kristopher.baker31-Mar-17 5:22
memberkristopher.baker31-Mar-17 5:22 
GeneralRe: The new Trump Two Dollar Bill Pin
dlhale31-Mar-17 8:38
memberdlhale31-Mar-17 8:38 
RantRe: The new Trump Two Dollar Bill Pin
Power Puff Boy27-Mar-17 4:30
memberPower Puff Boy27-Mar-17 4:30 
GeneralRe: The new Trump Two Dollar Bill Pin
JackPeacock31-Mar-17 2:40
professionalJackPeacock31-Mar-17 2:40 
GeneralIs it weird to want programming related desktop wallpapers? Pin
Siddharth R Barman19-Mar-17 7:14
memberSiddharth R Barman19-Mar-17 7:14 
GeneralRe: Is it weird to want programming related desktop wallpapers? Pin
PIEBALDconsult19-Mar-17 7:44
protectorPIEBALDconsult19-Mar-17 7:44 

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.