Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Time Again To Show Plus (+) 6 Hours


I want this to show plus (+) 6 hours:

$ftanggal=date("d M Y - H:i", (date("U")));

How?




View Complete Forum Thread with Replies

Related Forum Messages:
Deduct Date/time From Daste/time To Display Hours/days Difference
what i'm wanting to do is take away date logged from date closed therefore leaving the time between the 2 date/time stamps so that i can work out the average time later on and display as average time: 1day 2hours .

View Replies !
Time Is Off By 2 Hours?
Whenever I create a new php file and use the date function like so

<?php echo date("g:i"); ?>

My browser outputs the correct time (I believe i am GMT-5:00) the first few times the file is opened, then the time becomes slow by 3 hours every time it loads (ex: 7:00pm my time shows up as 4:00pm on the browser screen). Is there a simple way to add 3 hours in the date function?

View Replies !
Adding Hours To Time
Whats the most effective way of adding 3 hours to a time in the format of 1:30 (h:mm), and turning it into a 24 hour format?

I was thinking of turning it into a timestamp and working from there, but it seems a bit inefficient.

View Replies !
Adding 5 Hours To A Time Using PHP?
I would like to take a date of this format:

DATE("Y-m-d H:i:s")
and add 5 hours to it.

Is there an easy way it can be done? I was thinking about just changing the string, but there's too much to acount for (leap years, etc).

View Replies !
Server Time +8 Hours
I'm inputting a DATETIME timestamp of $now into my table

<?
$now = date("Y-m-d H:i:s");
?>

- which enters the exact time of update into the table. The problem is, is that I'm in Dublin (GMT) and the hosting server is in the US 7 hours behind. so if I entered data at exactly midday in dublin, the value displayed is 5am. Can someone guide me as to how I can alter the variable [b]$now[/b] to show Dublin time?

View Replies !
Expiry Time In Working Hours
Im writing a small application to time software projects. When a developer logs a query, they have to specify the estimated time it will take in working hours. I would like to state the estimated closing time, taking into account that the business works 09:00 - 17:00 Mon-Fri Code:

View Replies !
Time In Hours-Minutes-Seconds (accumulated)
Time in Hours-Minutes-Seconds (accumulated)

How do I do this?

I have minutes:
$minutes_online = intval((time() - strtotime($data[$i]['dLastLogon']))/60);

Ex:
$minutes_online = 8758;

How do I show this in Hour:Minute:Second - 10:32:22

View Replies !
Format The Time In Hours, Mins And Seconds
I can't seem to be format the time in hours, mins and seconds. I have looked at php.net/man. Does anyone know?

View Replies !
The Time That Is Left Until The Date Reaches 24 Hours
How would I display the time that is left until the date reaches 24 hours? 16 hours 8 min(s) until you get me back. PHP Code:

View Replies !
Expiry Time Expressed In Working Hours
Im writing a small application to time software projects. When a developer logs a query, they have to specify the estimated time it will take in working hours. I would like to state the estimated closing time, taking into account that the business works 09:00 - 17:00 Mon-Fri

Example 1
Query logged at 15:00 on 23/01/2006
Estimated time = 3:00
Estimated completion time 10:00 on 24/01/2006

Example 2
Query logged at 09:00 on friday 27/01/2006
Estimated time = 12:00
Estimated completion time 12:00 on Monday 30/01/2006

View Replies !
Converting Time To 'days, Hours:minutes'
I'm trying to 'age' files but can't seem to figure it out.

I'm getting the files modified value and doing:

> time() - $mtime;

to get back something like:

> 18699668

How do I convert this value to 'xdays, yhours:zminutes'?

View Replies !
Check Date And Time And Display A Link Between Certain Hours
I need to write a PHP script that can check the date and time, and if it falls in between certain hours to display a link, and if not display another link.

The application is for a realaudio broadcast which goes live 7-9pm every wednesday. If it's not "live" then the link would be to the archive from the previous show.

View Replies !
Backup Script And Settings Time Three Hours Forwards.
I am running an phpBB forum, and i need to set the time three hours forwards, or else it´s not correct. So can i write something like this:

time()+10800;

in a global file?

View Replies !
Show Time / Date To Reflect Eastern Standard Time
my web host is located on the west coast i live on the east coast so if my page shows the date:

$day = date(d);
$mth = date(m);
$yr = date(y);
echo $day . "-" . $mth . "-" . $yr;

i shows the date as of west coast time. so the time now is 1:40am april 6, 2007 my page will still show april 5, since west coast is 3 hours back. (10:40pm apr 5) how do i compensate for this time zone difference? i want my time / date to always reflect eastern standard time.

View Replies !
Difference In Hours Between Server Time (London) And User's Location
I've spent hours going round in circles with this and really dont get it. I'd like some code which simply works out how many hours ahead/behind a users local time is to the time of the server (in London). It needs to take into account summer time +1 hrs etc.

e.g. the code works out that a user is in Paris (or France) and then works out that they are +1 hr ahead of uk time. This would allow me to add an hour to times stored in databases when they are showed to the users, as the site is an international networking site.

View Replies !
Find Difference In Hours- Edit Code From Days To Hours?
I'm trying to find the difference in hours between one date from another, and my code currently finds the difference in days- could somebody edit the code to use hours instead of days?

$expirationdate[0] = $row3[datetillcompletion];
$startdate[0] = date('Y-m-d');
$startdate = strtotime($startdate[0]);
$expirationdate = strtotime($expirationdate[0]);
$delta = $expirationdate - $startdate;
$final=round($delta/86400);

View Replies !
Show Time In Local Time
I tried searching for the answer, but didn't really get anything back. Maybe it's the terminology I was using.

Can anyone help me in a direction for how to change what time zone a time is displayed for? My timestamps default to California and would like to show them as EST.

Or even show the time in whatever time zone the person viewing the time is in. Does that sentence make sense?

View Replies !
Show Time
in my php file i want to show the time. (preferably time and date) how do i write it? i tryed something like this: "$time= NOW();"

View Replies !
Time Show
I got a database with a time saved it in like this

Date Time Title
2004-04-28(DATE) 14:30(TIME) Something(char(250))
this is how I saved the data in the database
put then I pull out the data it shows up like this
date Time Title
2004-04-28 14:30:00 SOmething

I need a way to auto remove the last :00 then I take out the dates it would be a dam lot of work to change everything I have done so far, about 4 weeks of work.

View Replies !
Show Time In Different Timezone
My webserver is hosted in England and I'm in the US.  So all the time is showing up a couple hours ahead of my timezone.  I can't edit the php.ini file or none of that so I was wondering how would I go about changing the php scripts on my pages to display the time and date as EST. 

At 11 PM my time Saturday may 19 it said it was "Sunday May 20, 4:00 am"  So I can't just do something that changes that hour, I need it to display the correct date aswell.

View Replies !
How To Show Local Time To Viewers
The version of PHP on the server is 4.1

Now only time at server is displayed

I am searching everywhere but still stuck

is there some way to get the timezone form the client browser
without user interaction ?

View Replies !
Page Load Time Show Really High
im running PHP 5.2 on IIS 6 (Windows 2003 Server) and im getting a weird load time result when trying to display page load times on each page. e.g. Page generated in 1193387528.5501 seconds. this is my current code:
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '<p>Page generated in '.$total_time.' seconds.</p>'."
"; ?>

but i've tried 4 others which are all simular. Any idea as to why it's showing a false result as it's loading in unde 1 second (Dual Xeon 2.8 HT server and connecting over 100mb pipe (college campus)).

View Replies !
Delimiting Timestamp Queries To Show Only Date, No Time
I can't find anything on google or even searching the forums that comes remotely close to being understandable by me. I have a MySQL timestamp(current timestamp) I'm using to date every entry. HOWEVER, I can't figure out how to get rid of the time portion and only display the date.

View Replies !
How To Show The Estimated Time Left For A File Download
I want users to be able to download a file. Its all working. When the user clicks the link the windows "File download" box pops up asking if the user wants to save/open etc.

Press save and the file will save. However, the estimated time left says "Not known 1.4Mb downloaded" etc. How do I get it to show the estimated time left - i guess its something to do with fetching the actual file size from the server? Code:

View Replies !
Show The Current Time At The Resort On His Home Page.
I have a client who owns a resort in the Philippines. This client wants to show the current time at the resort on his home page. How would this be done with PHP? Is it some calculation based upon GMT? I think (I'll have to check) that the Philippines is +8 GMT...so is that what you'd have to do: create a snippet that grabs the current GMT and add "8" to it?

View Replies !
Dates 23.00 Hours To 0.00 Hours.
I have the following code

$day1 = mktime (0,0,0,1,1,$year);
$days = ($week - 1) * 7;
$d = strtotime ("+$days days", $day1);
$dow = date('w', $d);
$sunday = strtotime ("-$dow days", $d);
$saturday = strtotime ("+6 days", $sunday);

to give me the timestamp on sunday and saturday for a given week and year. The problem I have is that it's giving it at 23.00 hours when i need it at 0.00 hours.

1179010800 translates to Saturday, May 12th 2007, 23:00:00 (GMT)

Can anyone see the problem?

View Replies !
Write A Simple Script Which Will Show Different Content On A Page Depending On The Week And Time
I am trying to write a simple script which will show different content on a page depending on the week and time (it needs to change at 5pm on Friday over the weekend) and I came up with this: Code:

View Replies !
Checkboxes - Show A Tick In The Boxes To Show That They Have Already Been Added.
I have been trying to learn checkboxes and arrays, and I've finally figured out how to add the checkboxes to the database.

I currently have two forms  addlinks.php and modifylinks.php and I have a dolinks.php that submits my data to the database.

What I would like to do now is on my modifylinks page show a tick in the boxes to show that they have already been added.

At the moment if I dont tick any boxes on modifylinks.php it deletes my previous data, and I have to retick them everytime I do an update. Code:

View Replies !
Code To Show Slide Show In PHP
Can anyone guide me as to how can i display a slideshow of all the images present in an album and if possible the code.

View Replies !
Show Table Only If There Is Data To Show?
I have a table that shows specific data (via a while loop)

however, when you first log in as a new user, you see the table column headers but there is obviously no data, and it looks a bit unsightly.

How could i take this code:

View Replies !
Show First 10 Records, Then Show The Rest
Is it possible to show a fixed number of rows in a repeat region, then show all the rest?

What I mean is - I've got between 40 and 50 records in a database and it's easy to show them 10 at a time. But what I'd like to do is show the first 10, then show all the rest in one go. Code:

View Replies !
Hours &
I'm selecting from a database a time looks like this: 1170229906. I'm trying to find a way to print the hours & minuted differences between each couple, when I'm using while

($rs=mysql_fetch_assoc($result)) {.

For example, if the first time is 1170229906 and the second is 1170240253 - the result should be 2:53.

View Replies !
Add One Day (24 Hours) To A Date From
I'm having some trouble getting a grip on PHP's date handling. I've got my dates stored in a MySQL "datetime" column and I'm wondering, what is the best way to add one day (24 hours) to a date from that column?

View Replies !
Add Hours To A Date
I want to show a date coming from mysql (datetime format) to users, logging on from different timezones. Each user has it's own time:When a user logs on a session is created which hold the the time difference from the servertime e.g. user John has $_SESSION['mytime']=2; which means user John is in a timezone 2 hours later than the server.

Now if a servertime gives a datetime value of 2002-20-10 18:15:05 How can I make it display 2 hours later, so it will show 2002-20-10 20:15:05? I know mysql has a Date_add function, but I want to keep my queries as they are already, and keep my datedifferences calculation in my include file. So I am looking for a PHP-coded solution.

View Replies !
Restarting Every 24 Hours
How would i reset a .txt file with a number in it to 0 ever 24 hours?

View Replies !
Add 16 Hours To Datetime
I have a mysql database table that gets the "datetime" column automatically filled when a user fills in the php form page.

$curdate = date("Y-m-d H:i:s");

Trouble is, the database server is in the USA which is 16 hours behind my time. Does anyone know a way to change this so that the 16 hours get added to the datetime?

View Replies !
Allow To Edit Within X Hours
I have data that is inserted into a database, one of the fields is named 'time_stamp' and is a "datetime; 0000-00-00 00:00:00" type.

I was wondering how one could make an if statement that will show code (code is just the editing portion of the page) if the 'time_stamp' is less than the 'time_stamp' + 72 hours. Other wise, don't show the code and inform them that they can no longer edit.

View Replies !
Mins To Hours
i have a form when submitted hte php file the data is picked up by uses the timespan function to work out the time between two times given byt the user then it converts it into minutes. no on anouther page i want to be abe to convert it back into hours but when i put /60 after the variable it doesnt work it out correctly instead of the time being 11:59 hours it says 11.983333333333 . so how can i get it to convert back into 11:59?

View Replies !
Date() Being Off By 23 Hours
I have the Unix time stamp "1184616000" which I place into date('F j, Y h:i:s A', 1184616000) and I have tested it on two servers which produce "July 17, 2007 12:00:00 AM" but on some other servers it produces "July 16, 2007 01:00:00 PM". Since it is a pregenerated timestamp the date() output should be identical regardless of where it is executed. I am trying to figure out which is right and which is wrong. Can some people please try this out and let me know what you get?

View Replies !
Convert Hours
I've been trying to figure it out for hours and I'm tired because I know it isn't that difficult. guess it's just late and I can't think right.

Anyways, so I have a lot of hours. Let's go with 8786 hours for example. I need to convert that to look like"___ years ____ days ____ hours".

View Replies !
Add 24 Hours To A Timestamp
i want to add 24 hours to a timestamp. how can i do? i searched the php manual.

View Replies !
24 Hours Dissapearal??
I have a page where it grabs stuff from one of my tables, and only like a few people have access to that page and I wanted to know if there was a way that like when the people that have access to take page selects one of the names or w/e it takes it off of the page for 24 hours.

View Replies !
Detect 6 Hours From Now
I'm doing a time ban and so when a user is banned obviously for datebanned i have time(). So on my unban list I basically want to take the time() function and add 6 hours to it so it still stays in the number format and then insert it into my database. How can I add hours and so forth accurately?

View Replies !
Hours To Man Days
I know this is prob easy but i've looked around and can't find what i am looking for, plus i'm a little bit of a newb. I have a group of total hours for a bunch of workers,, i.e each is like 280 hrs and i need to display these set of hours in another way, i need to display them in total man days instead and a man day for me is 6.5 hours now i know i can just divide 280 by 6.5 in php but that gives me something like:

43.076923076923076923076923076923 i need it to output in a format something like 43 days + 1 hour (or minutes if less than an hour)

View Replies !
Counting Hours.
I have a Rota Submission page, which allows staff members to submit changes in rota, detailing their hours (start and finish), with additional hours if they're doing shifts, or an option for not being online at all. Code:

View Replies !
Finding Records Within The Last 48 Hours?
I can't seem to find anything on querying to find records dated within the last 48 hours. Not just two days/calendar dates, but 48 actual hours.

I'm hoping to do something like:

SELECT record FROM table WHERE postdate > (NOW - 48hrs)

does that make sense?

View Replies !
Calculate The Diffirence In HOURS
The following might be either PHP or MySQL question: How can I calculate the diffirence in HOURS between two values in DATETIME format?

View Replies !
Update Content Every 24 Hours
I'm looking for some basic guidance on the best method to automate the following task:

1) Pull some basic data / image from a database.
2) 24 hours later go back to database and redo the above to replace current content with new content.

I've looked around and can't find scripts close enough to the above for me to work out the best way to approach it. I know it involves two basic concepts:

1) Some sort of date / time comparison to control the 24hr update sequence (no date or timestamp is included in the Db table to be used).
2) Some way to randomly pick replacement content from the Db by id number.

Any suggestions or script samples are welcome. Not looking for any finished scripting here just pointers / samples on how best to approach it.

View Replies !
Figuring Out When 2 Hours Have Passed
What I'd like to do is this.  get a date and time and determine if it has been a certain amount of time since then.  For example, I make an entry in the database of 11:00pm, and I want to periodically check, and if it is 1:00am or later, then I would update the database.  Any suggestions?

View Replies !
How To Get Current Datetime Plus 24 Hours?
Can I somehow make $expiredate = date('Y-m-d h:s:m') + 24 hours? In my case the date will always be based on the current timestamp, but for future reference I would like to know if you can do it for other dates?

View Replies !
Last Twelve Hours Echoed
I am so tried but can someone help and show me a basic way to only display the last twelve hours of results from the MySQL? I have a column with the time, how do I only show the last tweleve hours?

View Replies !
Delete Files Every X Hours
I need a simple snippet that'd point me in the right direction on how to delete all the files inside a folder every __ hours.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved