-
FGET_TIME
From
Ace@VERT/DSTREAM to
ALL on Fri Feb 15 03:54:00 2002
I'm trying to put a files time-date stamp into a str to compare laterãon. Instead of getting, for example a file created today, todaysãdate-time on the file, I'm getting Thu Jan 01 1970 12:00 am ???ãããstr newsdateãint newsfile timeãããFOPEN newsfile O_RDONLY "e:\sbbs\xtrn\news.txt"ã FGET_TIME newsfile timeã TIME_STR newsdate timeãFCLOSE newsfileãã---ã þ QMPro 1.53 þ
telnet://dsbbs.net -
http://www.dsbbs.netã þ Synchronet þ Data Stream -
telnet://dsbbs.net - www.dsbbs.netã
-
From
Digital Man@VERT to
Ace on Fri Feb 15 04:28:43 2002
Re: FGET_TIMEã By: Ace to ALL on Fri Feb 15 2002 11:54 amãã > I'm trying to put a files time-date stamp into a str to compare laterã > on. Instead of getting, for example a file created today, todaysã > date-time on the file, I'm getting Thu Jan 01 1970 12:00 am ???ã > ã > ã > str newsdateã > int newsfile timeã > ã > ã > FOPEN newsfile O_RDONLY "e:\sbbs\xtrn\news.txt"ã > FGET_TIME newsfile timeã > TIME_STR newsdate timeã > FCLOSE newsfileããFGET_TIME is not implemented in Synchronet v3 (I don't remember the reason).ãUse the GET_FILE_TIME function instead, which is much simplier and doesn'tãrequire opening and closing the file.ãã-Robã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Winston Smith@VERT/ANETBBS to
Ace on Fri Feb 15 06:39:00 2002
RE: FGET_TIMEãBY: Ace to ALL on Fri Feb 15 2002 11:54 amãã > I'm trying to put a files time-date stamp into a str to compare laterã > on. Instead of getting, for example a file created today, todaysã > date-time on the file, I'm getting Thu Jan 01 1970 12:00 am ???ã ãYes. That is a UNIX C compiler Epoch Time Zero event. It means that you haveãan empty or zero value for the number of ticks in your clock value. On an IBMãPC a Time of "zero" would give you a date of Tuesday, Jan 01 1980 12:00 amã(i.e. hours, mins, secs, are all zero.) 'C' compiler time and UNIX time startsãon January 1st, 1970. IBM PC MS-DOS time starts on January 1st, 1980. What itãmeans is that your code is pointing to an "empty space", rather than toãsomething that has clock ticks in it.ãã---ã þ Synchronet þ AnotherNet BBS þ S. Burlington, VT þ
telnet://bbs.another.orgã
-
From
Ace@VERT/DSTREAM to
DIGITAL MAN on Fri Feb 15 12:54:00 2002
I'm trying to put a files time-date stamp into a str to compareãlaterã > > on. Instead of getting, for example a file created today, todaysã > > date-time on the file, I'm getting Thu Jan 01 1970 12:00 am ???ã > >ã > >ã > > str newsdateã > > int newsfile timeã > >ã > >ã > > FOPEN newsfile O_RDONLY "e:\sbbs\xtrn\news.txt"ã > > FGET_TIME newsfile timeã > > TIME_STR newsdate timeã > > FCLOSE newsfileããDM>FGET_TIME is not implemented in Synchronet v3 (I don't remember the reason).ã >Use the GET_FILE_TIME function instead, which is much simplier and doesn'tã >require opening and closing the file.ããI can't get this...! (DAMN!) The above makes sense to me butãGET_FILE_TIME <int_var> <str_var> doesn't, and seems opposite of what Iãneed. How do I get "e:\sbbs\xtrn\news.txt" into <str_var> to use inãthis function, and then that date/time into my newsdate string?ãã---ã þ QMPro 1.53 þ telnet://dsbbs.net - http://www.dsbbs.netã þ Synchronet þ Data Stream - telnet://dsbbs.net - www.dsbbs.netã
-
From
Digital Man@VERT to
Ace on Fri Feb 15 15:31:22 2002
Re: FGET_TIMEã By: Ace to DIGITAL MAN on Fri Feb 15 2002 08:54 pmãã > > > str newsdateã > > > int newsfile timeã > > >ã > > >ã > > > FOPEN newsfile O_RDONLY "e:\sbbs\xtrn\news.txt"ã > > > FGET_TIME newsfile timeã > > > TIME_STR newsdate timeã > > > FCLOSE newsfileã > ã > DM>FGET_TIME is not implemented in Synchronet v3 (I don't remember the reasoã > >Use the GET_FILE_TIME function instead, which is much simplier and doesn'ã > >require opening and closing the file.ã > ã > I can't get this...! (DAMN!) The above makes sense to me butã > GET_FILE_TIME <int_var> <str_var> doesn't, and seems opposite of what Iã > need. How do I get "e:\sbbs\xtrn\news.txt" into <str_var> to use inã > this function, and then that date/time into my newsdate string?ããstr fnameãint ftimeãstr newsdateãset fname "e:/sbbs/xtrn/news.txt"ãget_file_time ftime fnameãtime_str newsdate ftimeãããThat should work. What did you try?ãã-Robã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Amcleod@VERT to
Digital Man on Fri Feb 15 21:11:44 2002
Re: FGET_TIMEã By: Digital Man to Ace on Fri Feb 15 2002 11:31 pmãã > That should work. What did you try?ã ^^^^^^^^^^^^^^^^^ãHahaha! Very funny!ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Ace@VERT/DSTREAM to
DIGITAL MAN on Sat Feb 16 04:49:00 2002
> > I can't get this...! (DAMN!) The above makes sense to me butã > > GET_FILE_TIME <int_var> <str_var> doesn't, and seems opposite of what Iã > > need. How do I get "e:\sbbs\xtrn\news.txt" into <str_var> to use inã > > this function, and then that date/time into my newsdate string?ããDM>str fnameã >int ftimeã >str newsdateã >set fname "e:/sbbs/xtrn/news.txt"ã >get_file_time ftime fnameã >time_str newsdate ftimeãããDM>That should work. What did you try?ããHoly crap! What genius decided to use /'s instead of normal \'s ?? Noãwonder I've had such a hard time...! Why is this and how long has itãbeen a secret? (prg works great now btw, thanks! :)ãã(PS. I was also using SETSTR instead of SET)ãã---ã þ QMPro 1.53 þ
telnet://dsbbs.net -
http://www.dsbbs.netã þ Synchronet þ Data Stream -
telnet://dsbbs.net - www.dsbbs.netã
-
From
Amcleod@VERT to
Ace on Sat Feb 16 08:48:07 2002
Re: FGET_TIMEã By: Ace to DIGITAL MAN on Sat Feb 16 2002 12:49 pmãã > Holy crap! What genius decided to use /'s instead of normal \'s ?? ããUh, it's "\" that is AB-normal. ANyway, _either_ works, but of course, the "\"ãis the ESCape character in C-ish strings, so you have the choice:ããRemain a Thrall to the evil of Mordor ^W Microsoft and useãã "e:\\sbbs\\xtrn\\news.txt"ãã(escaping the backslashes with another backslash), OR:ããJoin the civilized world and useãã "e:/sbbs/xtrn/news.txt"ããor as civilized as possible, seeing as you have to stick with that abominationãknown as a "Drive Letter".ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Digital Man@VERT to
Ace on Sat Feb 16 18:09:15 2002
Re: FGET_TIMEã By: Ace to DIGITAL MAN on Sat Feb 16 2002 12:49 pmãã > > > I can't get this...! (DAMN!) The above makes sense to me butã > > > GET_FILE_TIME <int_var> <str_var> doesn't, and seems opposite of whatã > > > need. How do I get "e:\sbbs\xtrn\news.txt" into <str_var> to use inã > > > this function, and then that date/time into my newsdate string?ã > ã > DM>str fnameã > >int ftimeã > >str newsdateã > >set fname "e:/sbbs/xtrn/news.txt"ã > >get_file_time ftime fnameã > >time_str newsdate ftimeã > ã > ã > DM>That should work. What did you try?ã > ã > Holy crap! What genius decided to use /'s instead of normal \'s ?? ããEither one will work, but forward-slashes are Unix-compatible and back-slashesãare not.ãã > No wonder I've had such a hard time...! ããBack-slashes were not your problem.ãã > Why is this and how long has it been a secret? ããIt hasn't been a secret. I've posted about forward slashes in Baja pathnamesãmany times.ãã > (prg works great now btw, thanks! :)ããGreat!ãã > (PS. I was also using SETSTR instead of SET)ããDoesn't matter, either will work (to set the "str" variable, that is).ãã-Robã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Winston Smith@VERT/ANETBBS to
Ace on Sat Feb 16 12:15:00 2002
RE: FGET_TIMEãBY: Ace to DIGITAL MAN on Sat Feb 16 2002 12:49 pmãã > Holy crap! What genius decided to use /'s instead of normal \'s ?? Noã > wonder I've had such a hard time...! Why is this and how long has itã > been a secret? (prg works great now btw, thanks! :)ã ãThat is the UNIX C compiler again. UNIX uses a forward slash, and since C isãused to build UNIX, many 'C' compilers use a forward slash. If you are usingãan editor written in 'C' like EMacs, you have to use forward slashes in theãfile descriptors. It gets somewhat confusing forward slashing the filenamesãand backslashing the shell command moves, but you get used to it!ã ã ã... WWW.WERS.ORG, WERS Streaming Audio, 22:00 UTC/GMT, "The Playground"ã... WWW.WERS.ORG, Saturdays, Sundays, 22:00-00:99 UTC/GMT, Playgroundãã---ã þ Synchronet þ AnotherNet BBS þ S. Burlington, VT þ
telnet://bbs.another.orgã
-
From
bgdsr@VERT/VBARNET to
Ace on Sat Feb 16 06:33:00 2002
RE: FGET_TIMEãBY: Ace to DIGITAL MAN on Sat Feb 16 2002 12:49 pmãã > > > I can't get this...! (DAMN!) The above makes sense to me butã > > > GET_FILE_TIME <int_var> <str_var> doesn't, and seems opposite of whatã > > > need. How do I get "e:\sbbs\xtrn\news.txt" into <str_var> to use inã > > > this function, and then that date/time into my newsdate string?ã > ã > DM>str fnameã > >int ftimeã > >str newsdateã > >set fname "e:/sbbs/xtrn/news.txt"ã > >get_file_time ftime fnameã > >time_str newsdate ftimeã > ã > ã > DM>That should work. What did you try?ã > ã > Holy crap! What genius decided to use /'s instead of normal \'s ?? Noã > wonder I've had such a hard time...! Why is this and how long has itã > been a secret? (prg works great now btw, thanks! :)ã > ã > (PS. I was also using SETSTR instead of SET)ã > ããHave you ever heard off UNIX? as for the / verses \ãlolãã--Barryãã---ã þ Synchronet þ VBARNET BBS * Baltimore, MD USA *
telnet://vbarnet.d2g.comã
-
From
Digital Man@VERT to
Winston Smith on Sun Feb 17 12:04:01 2002
Re: FGET_TIMEã By: Winston Smith to Ace on Sat Feb 16 2002 08:15 pmãã > RE: FGET_TIMEã > BY: Ace to DIGITAL MAN on Sat Feb 16 2002 12:49 pmã > ã > > Holy crap! What genius decided to use /'s instead of normal \'s ?? Noã > > wonder I've had such a hard time...! Why is this and how long has itã > > been a secret? (prg works great now btw, thanks! :)ã > ã > That is the UNIX C compiler again. UNIX uses a forward slash, and since C iã > used to build UNIX, many 'C' compilers use a forward slash. ããNo, this has nothing to do with 'C' compilers or the 'C' programming language.ãã > If you are usinã > an editor written in 'C' like EMacs, you have to use forward slashes in theã > file descriptors. It gets somewhat confusing forward slashing the filenamesã > and backslashing the shell command moves, but you get used to it!ããDOS-based OSes support forward slashes in the pathnames access from programs,ãbut not from the command shell (where they require backslashes).ãã-Robã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã