LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-06-2005, 04:57 PM   #1
tipsy
LQ Newbie
 
Registered: Aug 2005
Posts: 3

Rep: Reputation: 0
system date


Hey, is it possible to change system date without root rights, or just tell false date for an util ?
 
Old 08-06-2005, 05:45 PM   #2
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
As far as I'm aware now, whoever you might may be able to change the time region.
 
Old 08-07-2005, 04:06 AM   #3
tipsy
LQ Newbie
 
Registered: Aug 2005
Posts: 3

Original Poster
Rep: Reputation: 0
leet, but how does it help ?
 
Old 08-07-2005, 02:21 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Rather than trying to trick the system, what are you actually trying to accomplish? In other words, what goal are you trying to achieve by setting a false "date"? -- J.W.
 
Old 08-07-2005, 02:40 PM   #5
tipsy
LQ Newbie
 
Registered: Aug 2005
Posts: 3

Original Poster
Rep: Reputation: 0
the goal is to set different date in a prog, which is using the system date for its date functions

Last edited by tipsy; 08-07-2005 at 03:13 PM.
 
Old 08-07-2005, 08:17 PM   #6
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
OK - but it's still confusing (to me anyway). Time (as in GMT) does not have multiple simultaneous values, and likewise, it doesn't switch back and forth from one value to another. Whatever timezone you are in, there is only one current time, so I'm not sure why a program that apparently depends on knowing the current sysdate would need to pretend that it's "X" at certain times but "Y" at other times....

Edit: I clicked too early. My point is that you could set a variable to the sysdate, then add or subtract time to it, and simply reference the variable rather than the actual sysdate. You just don't want to mess with sysdate, particularly on a multi-user system -- you could do way too much damage. Example: if there were any cron jobs scheduled, and your program modified sysdate, you could unexpectedly find that suddenly certain tasks were running that you had no intention of running. Seriously, sysdate should always be set to GMT (+/- the appropriate offset for your timezone) otherwise don't mess with it -- J.W.

Last edited by J.W.; 08-07-2005 at 08:23 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
date of linux system pragti Programming 1 06-09-2004 01:24 AM
tar file name with system date mnauta Linux - General 4 12-19-2003 04:48 PM
Change system time or date or both lel800 Linux - Newbie 6 10-28-2003 07:00 PM
lastlog date does not match system date? jcmj Linux - Networking 6 10-22-2002 12:09 PM
call for system date in c mr.moto Programming 2 09-30-2002 03:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration