473,788 Members | 2,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Time Help

Hello,
I have this script and it shows GMT time and I need it to show -8 GMT
for PST time.
Here is the code that needs changing.
( "F j, Y g:ia T", $row[date] )


What do I change to get it to -8?
Any help would be appreciated.
Dec 13 '07 #1
7 1466
gmstrftime()
http://www.php.net/gmstrftime
Dec 13 '07 #2
On Thu, 13 Dec 2007 15:29:19 -0800 (PST), macca
<pt*******@goog lemail.comwrote :
>gmstrftime()
http://www.php.net/gmstrftime

I just need an example as I looked at the site and I'm not good with
PHP.

Dec 14 '07 #3
John schreef:
On Thu, 13 Dec 2007 15:29:19 -0800 (PST), macca
<pt*******@goog lemail.comwrote :
>gmstrftime()
http://www.php.net/gmstrftime


I just need an example as I looked at the site and I'm not good with
PHP.
The example is quite obvious, what is it that you don't understand?
JW
Dec 14 '07 #4
John wrote:
( "F j, Y g:ia T", $row[date] )
What do I change to get it to -8?

( "F j, Y g:ia T", $row[date] - 8*3600 )

i.e. subtract 8 hours (an hour is 3600 seconds) from the time before
displaying it.

There might be some funniness around daylight savings, but there's always
funniness around then. This is why I think daylight savings, and perhaps
even time zones as a whole, should be abolished. Everyone should just use
UTC for everything all the time.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 6 days, 20:54.]

Sharing Music with Apple iTunes
http://tobyinkster.co.uk/blog/2007/1...tunes-sharing/
Dec 14 '07 #5

Thank you Toby for the example.

This is exactly what I needed.
>
( "F j, Y g:ia T", $row[date] - 8*3600 )

i.e. subtract 8 hours (an hour is 3600 seconds) from the time before
displaying it.
Dec 14 '07 #6
One more quick question. How do I make say PST instead of GMT?
>John wrote:
>( "F j, Y g:ia T", $row[date] )
What do I change to get it to -8?


( "F j, Y g:ia T", $row[date] - 8*3600 )

i.e. subtract 8 hours (an hour is 3600 seconds) from the time before
displaying it.

There might be some funniness around daylight savings, but there's always
funniness around then. This is why I think daylight savings, and perhaps
even time zones as a whole, should be abolished. Everyone should just use
UTC for everything all the time.
Dec 14 '07 #7
My god man RTFM!

You could use

timezone_offset _get()

The examples are on the page http://www.php.net/timezone_offset_get()
so i cant be bothered typing it out for you.
Dec 15 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2328
by: Maksim Kasimov | last post by:
hi all, sorry if i'm reposting why time.strptime and time.localtime returns tuple with different DST (9 item of the tuple)? is there some of setting to fix the problem? Python 2.2.3 (#1, May 31 2005, 11:33:52) ] on freebsd4 Type "help", "copyright", "credits" or "license" for more information. >>> import time
3
7831
by: Jay | last post by:
I previously posted this question under Visual Basic newsgroup, but was advised to re-post here. I'm hoping someone can help me solve an issue I'm having with VB.Net and Access 2000. Here's the issue. I hope I've included all relevant information. On a form, I have a DateTimePicker with the following
77
4613
by: Charles Law | last post by:
Hi guys I have a time critical process, running on a worker thread. By "time critical", I mean that certain parts of the process must be completed in a specific time frame. The time when the process starts is not especially important, but it must be complete within a small number of seconds. The operations I am performing do not take a long time (hundreds of milliseconds), but as each part of the process is complete, my worker thread...
5
12993
by: Jamie Pittman via AccessMonster.com | last post by:
I have two tables with 5000 entries on them. One is based for regular time with several variables example (employee name, date,time in and out, code, customer, building) I have another table that works with overtime but has the same feilds within the table. I want to be able to run a report that combines the regular time and overtime for the warehouse and seperated by each customer. I have tried join tables but I keep ending with, (if it...
8
6558
by: Nick M | last post by:
Hello All, Excellent info here Thanks! I am very new to using access in general and I am on a learning curve. I'm trying to import an excel workbook (with worksheets) into an access db via a macro. (I'll get to using VB later on). What I would like to do is import a single workbook w/three seperate worksheets into three seperate access tables AND truncate the time stamp that is used in the excell sheet via a macro.
7
3020
by: Shimon Sim | last post by:
I have a custom composite control I have following property
1
2227
by: MR | last post by:
Hi, it has been observed that when we try to instantiate a .Net dll for the first time in a session (e.g. from an exe in .Net), it takes almost 10 times compared to subsequent instantiations. We have A.exe, developed in VB.Net, where, in a button click, we are instantiating the Test.dll also developed in VB.Net. We run three instances of A.exe simultaneously (say A1, A2 and A3 are the three instances). Clicking on
9
3229
by: Bob Achgill | last post by:
I would like to use the timestamp on files to manage the currency of support files for my VB windows application. In this case I would only put the timestamp of the file in the management database and not the file itself. To do this I will need to have a File class property for Create time and date that will let me "set" the Create time and date of the file to my own chooseing. The VB file class does not appear to have the ability
2
1539
by: smatthews | last post by:
Access 2000 question Hi any help or advise required if possible i am trying to create a formula for a field. here is what i have currently rem: IIf(Time()<!,MinToTime((*60)),MinToTime(((*60))-(!*60)-(IIf(Time()>"09:00:00" And
4
2468
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I suspect some permissions problem. I'm running VS.NET 2008 in Vista. Symptoms and observations: * ASP.NET's native ImageMap and Image controls work just fine and provide a design-time preview of images that are referenced via the ImageUrl property *...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10370
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5402
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.