Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

 
 

Time Offset in Unix

Expert Oracle Tips by Laurent Schneider

March 30, 2011

 

By Laurent Schneider

Oracle guru and Rampant TechPress author, Laurent Schneider, has provided us with a way to figure the offset of the current time offset from GMT:

What is the time offset of the current date in Unix?

perl -e '

   $t=time;
   @l=localtime($t);
   @g=gmtime($t);
   $d=$l[2]-$g[2]+($l[1]-$g[1])/60;
   $gd=$g[3]+$g[4]*31+$g[5]*365;
   $ld=$l[3]+$l[4]*31+$l[5]*365;
   if($gd<$ld){$d+=24};
   if($gd>$ld){$d-=24}
print ($d."\n")'

2

Am I in summer (DST)?

perl -e 'if((localtime)[8]){print"yes"}else{print "no"}'

yes

Information on Oracle DDL auditing is available on this page in more detail.


 

 
 
 
Get the Complete
Oracle Tuning Details 

The landmark book "Oracle Tuning: The Definitive Reference Second Edition" has been updated with over 1,150 pages of expert performance tuning tips. It's packed with scripts and tools to hypercharge Oracle 11g performance and you can buy it for 40% off directly from the publisher.
 


Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

 

 
   

 Copyright © 1996 -2016 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks
 

 

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA