Toad World® Forums

current_timezone

I am trying to write a statment using current_timezone that is dependant on a location. We are a transportation company. we in CST timezone. When i deliver to the West cost, our communications units show central time 6am cst. I have the appt time set for 6am PST. when the driver arrives at customer at 6am PST, the communications unit shows 8am. I would like to write the SQL to show the time difference based on the location of the delivery.

any ideas?

To begin to assist you we would need a lot more information from you on this. Like:

You state you are ‘trying to write a statement’. What type statement are you trying to write?

What is the goal of your ‘statement’?

You state: “when I deliver to the West Coast our communications units show central time”.

Is that an issue for you or not?

You also state:

“when the driver arrives at customer at 6am PST, the communications unit shows 8am.”

  • I do not see any issue with that as that seems accurate to me - so what exact problem are you trying to solve here?

do you have the DDL of any tables involved with your system and involved in your issue that you can post and share with ut?

If you have a column that indicates a location or a time zone (EST\CST\Mountain Time\PST) you should be able to write a view on that table that would adjust the times based on location - is that what you are after?