mIRC Home    About    Download    Register    News    Help

Print Thread
Return creation date of a dll file. #235150 25/11/11 10:05 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I trying to use this code to get creation date of a dll file
Code:
//echo -a $asctime($file($mircdirscripts\system files\dlls\dcx.dll).ctime,dd/mm/yy hh:nn tt)


and it return 26/09/11 06:04 pm

but if i read the properties of the file i get the information

26 September 2011, 7:04:54 pm, as you see the code return the wrong information (the time), how can i correct this?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Return creation date of a dll file. [Re: sparta] #235153 25/11/11 12:34 PM
Joined: Jun 2003
Posts: 81
T
TRT Offline
Babel fish
Offline
Babel fish
T
Joined: Jun 2003
Posts: 81
I think what happens is that Windows Explorer is aware that you were on daylight saving when the file was created and adjusts the time accordingly.

Maybe this fuctionality could be added with an additional switch.

Last edited by TRT; 25/11/11 02:27 PM.
Re: Return creation date of a dll file. [Re: TRT] #235154 25/11/11 02:27 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
the properties of the file come from the same explorer (windows), shouldn't mirc return the same information? same file, same windows?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Return creation date of a dll file. [Re: sparta] #235157 25/11/11 05:46 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
The date/time being shown in Windows *may* be set to not use DST and is then displayed in Windows using DST. mIRC would show what it's actually set to. You might try viewing the file's properties from the command prompt and see what it shows there. Windows shouldn't be fiddling with anything that you see there.


Invision Support
#Invision on irc.irchighway.net
Re: Return creation date of a dll file. [Re: Riamus2] #235160 25/11/11 07:07 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I noticed a problem, it return the same time for all dll files i using, this cant be right.. smirk and i dont know any other way to grab that info from the dill files, i load them to a dialog together with my remote/aliases files, and i show some info about them. and this is the reason i want the creation date from the file, same with modification date, it also give me the wrong information, any other way then my code i can use to retrieve this information?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Return creation date of a dll file. [Re: sparta] #235162 25/11/11 08:15 PM
Joined: Jun 2003
Posts: 81
T
TRT Offline
Babel fish
Offline
Babel fish
T
Joined: Jun 2003
Posts: 81
You probably used some simple file archiving or backup program that didn't bother with keeping the original creation time.
I suggest you stick to version numbers: they are easier to compare and won't get changed by accident.

Re: Return creation date of a dll file. [Re: TRT] #235176 26/11/11 06:21 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
No backup program at all, so no changes in files since i unrared them.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Return creation date of a dll file. [Re: sparta] #235181 26/11/11 01:51 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
If you had verified the DST issue mentioned, you'd already have your answer. Saying they all show the "same time" is misleading. You are getting 1 hour difference on all of them. That is what you should be saying. I just went through and verified this for you. Turning off automatic DST in Windows shows the same time in mIRC and in Windows. This is what you were told right at the start.

Windows is apparently setting the time information incorrectly. This may be an issue when decompressing it because it doesn't happen if I manually create a file. In any case, the time Windows shows is being calculated based on your DST settings and that's causing the problem. Turn off automatic DST and it will probably work just fine. But that isn't the best solution for you if you're distributing the script. Instead, just accept the hour difference or add 1 hour to your time using the script as long as the time shows the same for everyone. There is also a $daylight identifier that can be used, though it doesn't help right now because DST is not in effect right now. Or just get one of the utilities available that let you manipulate the file creation time/date and fix it there. Then make sure it shows correctly with DST enabled and disabled.

You'll probably notice that it shows the right time when DST starts back up. This isn't mIRC's fault because mIRC doesn't use DST at all unless you make use of $daylight. It's an issue in Windows and disabling automatic DST shows that.


Invision Support
#Invision on irc.irchighway.net