By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,245 Members | 1,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,245 IT Pros & Developers. It's quick & easy.

Problem in Date Function

P: 40
Hi,

I am using localtime() function to fetch the date and time.

But the problem arise is when the user change the date and time .,
it will affect the program also..

Is there any function available in perl to fetch the system date..
Apr 19 '08 #1
Share this Question
Share on Google+
5 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
Hi,

I am using localtime() function to fetch the date and time.

But the problem arise is when the user change the date and time .,
it will affect the program also..

Is there any function available in perl to fetch the system date..
If you read that documentation for localtime() on perldoc, you will read that localtime() reads the date via the time function, which I believe does pull the time from the system.

Regards,

Jeff
Apr 20 '08 #2

P: 40
Hi.,

I used the localtime() function in perl.. it returns the current time from the system.
When I change the date/time from the system Date Time Properties. It returns the modified date..

But I need a Date/Time which will fetch from BIOS / some standard server.
which wont affect when user chages the date/time properties from the system.

Is it possible..
Looking for Ur idea and suggestions
Apr 24 '08 #3

numberwhun
Expert Mod 2.5K+
P: 3,503
Hi.,

I used the localtime() function in perl.. it returns the current time from the system.
When I change the date/time from the system Date Time Properties. It returns the modified date..

But I need a Date/Time which will fetch from BIOS / some standard server.
which wont affect when user chages the date/time properties from the system.

Is it possible..
Looking for Ur idea and suggestions
Sorry for the misunderstanding. In that case, you may want to look at something like this.

Regards,

Jeff
Apr 24 '08 #4

P: 40
Sorry for the misunderstanding. In that case, you may want to look at something like this.

Regards,

Jeff
Hi Jeff.,

Sorry for belated reply.,
I go through the link specified by U in last thread..

but it didn't give any result when I run the sample script in the specified module.
May 2 '08 #5

numberwhun
Expert Mod 2.5K+
P: 3,503
Hi Jeff.,

Sorry for belated reply.,
I go through the link specified by U in last thread..

but it didn't give any result when I run the sample script in the specified module.
The code shown in the module is for retrieving the current time. You would have to code to have the system time changed to match. You could script this and then put it into the system scheduler (cron on Unix), to run as often as you like.

Regards,

Jeff
May 6 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.