How do I alter oracle sysdate?

In Oracle, I need to make sysdate in my local enrironment to mirrow remote production environment.
Please advise on how to go about.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Jinesh KamdarConnect With a Mentor Commented:
Do u mean just the date format or the actual server system time? For the former, use this -
Jinesh KamdarCommented:
I do not object though I would have appreciated a response from the asker or the reason for the deletion.
schwertnerConnect With a Mentor Commented:
You have to change the OS sysdate appropriatelly:
Oracle takes System date from the OS. Shut down Oracle, Change the OS date and restart Oracle. That will give you New Systemdate.
If you do not Shut down/ Restart Oracle, it some time creates problems.

sdstuberConnect With a Mentor Commented:
Do you need to change the time, or just the timezone?

You can do that by setting the TZ environment variable prior to starting your database.

If you need the actual time switched as well, then, as others have suggested, you need to change the OS.  Perhaps set both servers to use the same NTP server. or have one be the NTP server for the other.  Either option should correct future drift.

Also, if you simply need to test specific times, you can always set the fixed_date init parameter.  That won't keep them insynch, but will allow you to test date/time specific scenarios

All Courses

From novice to tech pro — start learning today.