Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 18:25
Hamed Musavi30-May-10 18:25 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Luc Pattyn31-May-10 1:48
sitebuilderLuc Pattyn31-May-10 1:48 
QuestionUnix Time Pin
jojoba201130-May-10 7:39
jojoba201130-May-10 7:39 
AnswerRe: Unix Time Pin
PIEBALDconsult30-May-10 8:34
mvePIEBALDconsult30-May-10 8:34 
AnswerRe: Unix Time Pin
Kristian Sixhøj30-May-10 9:09
Kristian Sixhøj30-May-10 9:09 
QuestionRe: Unix Time Pin
jojoba201130-May-10 21:07
jojoba201130-May-10 21:07 
AnswerRe: Unix Time Pin
Kristian Sixhøj31-May-10 2:34
Kristian Sixhøj31-May-10 2:34 
GeneralRe: Unix Time Pin
Daniel Grunwald31-May-10 8:14
Daniel Grunwald31-May-10 8:14 
That'll work on English systems only (or systems set to accept dates in English format).
The string format of dates is culture-specific, so Convert.ToDateTime will fail with that hard-coded date on non-English systems.
Use DateTime.Parse("1/1/1970 12:00:00 AM", CultureInfo.GetCultureInfo("en-US")), or simply new DateTime(1970, 1, 1).

Edit: Oh, and the site you linked to used UtcNow, you're using Now. Unix dates are the seconds since 1st January 1970 GMT, so your code produces incorrect results almost everywhere in the world (even in the UK, it's only correct during winter time).
AnswerRe: Unix Time Pin
PIEBALDconsult31-May-10 5:25
mvePIEBALDconsult31-May-10 5:25 
Questionignore special chars in string Pin
michaelgr130-May-10 7:11
michaelgr130-May-10 7:11 
AnswerRe: ignore special chars in string Pin
Hamed Musavi30-May-10 7:14
Hamed Musavi30-May-10 7:14 
AnswerRe: ignore special chars in string Pin
Abhinav S30-May-10 7:31
Abhinav S30-May-10 7:31 
GeneralRe: ignore special chars in string Pin
yu-jian30-May-10 15:06
yu-jian30-May-10 15:06 
AnswerRe: ignore special chars in string Pin
Abhinav S30-May-10 18:25
Abhinav S30-May-10 18:25 
GeneralRe: ignore special chars in string Pin
yu-jian31-May-10 1:38
yu-jian31-May-10 1:38 
QuestionCopy Excel columns or rows into an Array in C sharp programme Pin
Kutilya30-May-10 0:47
Kutilya30-May-10 0:47 
AnswerRe: Copy Excel columns or rows into an Array in C sharp programme Pin
Garth J Lancaster30-May-10 1:33
professionalGarth J Lancaster30-May-10 1:33 
AnswerRe: Copy Excel columns or rows into an Array in C sharp programme Pin
Richard MacCutchan30-May-10 1:57
mveRichard MacCutchan30-May-10 1:57 
QuestionCrystal Report Giving Error At Runtime Pin
Sanket.Patil29-May-10 23:30
Sanket.Patil29-May-10 23:30 
AnswerRe: Crystal Report Giving Error At Runtime Pin
Abhinav S29-May-10 23:57
Abhinav S29-May-10 23:57 
GeneralRe: Crystal Report Giving Error At Runtime Pin
Sanket.Patil30-May-10 0:11
Sanket.Patil30-May-10 0:11 
GeneralRe: Crystal Report Giving Error At Runtime Pin
Abhinav S30-May-10 3:02
Abhinav S30-May-10 3:02 
QuestionOOPS Pin
NetQuestions29-May-10 21:43
NetQuestions29-May-10 21:43 
AnswerRe: OOPS Pin
Richard MacCutchan29-May-10 21:45
mveRichard MacCutchan29-May-10 21:45 
AnswerRe: OOPS Pin
Md. Marufuzzaman29-May-10 22:40
professionalMd. Marufuzzaman29-May-10 22:40 

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.