On 10/6/2013 11:21 PM, Romain CIACCAFAVA wrote:
An easier way to do that would be using the diff() method of a DateTime object
on another.
Regards
Romain Ciaccafava
Romain - you were so right. A little less calculating to be done and I
got the result I wished. For anyone interested here's
I always hate dealing with date/time stuff in php - never get it even
close until an hour or two goes by
anyway
I have this:
// get two timestamp values
$exp_time = $_COOKIE[$applid.expire];
$curr_time = time();
// get the difference
$diff = $exp_time - $curr_time;
// produce a display
You should use gmdate() if you want to how many hours left to expire
$time_left = gmdate(H:i:s,$diff);
Best Regards
Farzan Dalaee
On Oct 7, 2013, at 1:49, Jim Giner jim.gi...@albanyhandball.com wrote:
I always hate dealing with date/time stuff in php - never get it even close
until an
On 10/6/2013 6:36 PM, Farzan Dalaee wrote:
You should use gmdate() if you want to how many hours left to expire
$time_left = gmdate(H:i:s,$diff);
Best Regards
Farzan Dalaee
On Oct 7, 2013, at 1:49, Jim Giner jim.gi...@albanyhandball.com wrote:
I always hate dealing with date/time stuff in
Try this please
gmdate(H:i:s, $diff%86400)
Best Regards
Farzan Dalaee
On Oct 7, 2013, at 2:12, Jim Giner jim.gi...@albanyhandball.com wrote:
On 10/6/2013 6:36 PM, Farzan Dalaee wrote:
You should use gmdate() if you want to how many hours left to expire
$time_left = gmdate(H:i:s,$diff);
On 10/6/2013 6:49 PM, Farzan Dalaee wrote:
Try this please
gmdate(H:i:s, $diff%86400)
Best Regards
Farzan Dalaee
On Oct 7, 2013, at 2:12, Jim Giner jim.gi...@albanyhandball.com wrote:
On 10/6/2013 6:36 PM, Farzan Dalaee wrote:
You should use gmdate() if you want to how many hours left
Its so freaky
Best Regards
Farzan Dalaee
On Oct 7, 2013, at 2:29, Jim Giner jim.gi...@albanyhandball.com wrote:
On 10/6/2013 6:49 PM, Farzan Dalaee wrote:
Try this please
gmdate(H:i:s, $diff%86400)
Best Regards
Farzan Dalaee
On Oct 7, 2013, at 2:12, Jim Giner
This should help you out
http://stackoverflow.com/questions/365191/how-to-get-time-difference-in-minutes-in-php
On Oct 6, 2013 6:07 PM, Farzan Dalaee farzan.dal...@gmail.com wrote:
Its so freaky
Best Regards
Farzan Dalaee
On Oct 7, 2013, at 2:29, Jim Giner jim.gi...@albanyhandball.com
Jim,
The date method takes in a timestamp (not seconds away).
You have the seconds, you will need to manually convert those seconds to
what you desire (minutes = seconds / 60), (hours = minutes / 60), etc..
Aziz
On Sun, Oct 6, 2013 at 7:07 PM, Farzan Dalaee farzan.dal...@gmail.comwrote:
Its
Look at my code. The inputs are all timestamps so date should work, no?
My question why am i getting an hour value in this case?
jg
On Oct 6, 2013, at 7:14 PM, Aziz Saleh azizsa...@gmail.com wrote:
Jim,
The date method takes in a timestamp (not seconds away).
You have the seconds, you
The resulting subtraction is not a valid timestamp, but rather the
difference between the two timestamps in seconds . The resulting diff can
be 1 if the timestamps are 1 seconds apart. The
linkhttp://stackoverflow.com/questions/365191/how-to-get-time-difference-in-minutes-in-phpJonathan
sent out
On Sun, 2013-10-06 at 19:14 -0400, Aziz Saleh wrote:
Jim,
The date method takes in a timestamp (not seconds away).
You have the seconds, you will need to manually convert those seconds to
what you desire (minutes = seconds / 60), (hours = minutes / 60), etc..
Aziz
On Sun, Oct 6,
On 10/6/2013 7:40 PM, Aziz Saleh wrote:
The resulting subtraction is not a valid timestamp, but rather the
difference between the two timestamps in seconds . The resulting diff can
be 1 if the timestamps are 1 seconds apart. The
On 10/6/2013 7:55 PM, Ashley Sheridan wrote:
On Sun, 2013-10-06 at 19:14 -0400, Aziz Saleh wrote:
Jim,
The date method takes in a timestamp (not seconds away).
You have the seconds, you will need to manually convert those seconds to
what you desire (minutes = seconds / 60), (hours = minutes
An easier way to do that would be using the diff() method of a DateTime object
on another.
Regards
Romain Ciaccafava
Le 7 oct. 2013 à 03:10, Jim Giner jim.gi...@albanyhandball.com a écrit :
On 10/6/2013 7:55 PM, Ashley Sheridan wrote:
On Sun, 2013-10-06 at 19:14 -0400, Aziz Saleh wrote:
hi all,
$dateNow = date('Y-m-d H:i:s');
echo pstrong.$dateNow ./strong/p;
can some see why the date time is lagging or late by 30 minutes from the
server time even when server time are correct
On Tue, Apr 28, 2009 at 3:45 PM, Andrew Williams
andrew4willi...@gmail.comwrote:
hi all,
$dateNow = date('Y-m-d H:i:s');
echo pstrong.$dateNow ./strong/p;
can some see why the date time is lagging or late by 30 minutes from the
server time even when server time are correct
--
Best
2007. 03. 30, péntek keltezéssel 14.00-kor Jason Pruim ezt írta:
On Mar 29, 2007, at 4:52 PM, Zoltán Németh wrote:
snip
(I assume you want this calculation within one given day)
you could read all rows into an array like
$timeinfo = array();
$sql = SELECT minute, sequence FROM
On Mar 29, 2007, at 6:16 PM, Jim Lucas wrote:
you stated in a different email that there are 6 possible values/
settings for the sequence col.
what are they, and what do they mean?
One person asked about missed punches. What happens if someone
forgets to clock out? Is an entry made for
On Mar 29, 2007, at 4:52 PM, Zoltán Németh wrote:
snip
(I assume you want this calculation within one given day)
you could read all rows into an array like
$timeinfo = array();
$sql = SELECT minute, sequence FROM table WHERE day='$day';
$result = mysql_query($result);
while ($row =
Thanks everyone for your suggestions, it turns out it was a unix time
stamp and I can get it to parse out a normal date now.
Now... on to the harder part
What I am trying to do is learn... This is kind of just a pet project
for me to figure out how I can do it. here is how the database
2007. 03. 29, csütörtök keltezéssel 16.38-kor Jason Pruim ezt írta:
Thanks everyone for your suggestions, it turns out it was a unix time
stamp and I can get it to parse out a normal date now.
Now... on to the harder part
What I am trying to do is learn... This is kind of just a pet
Jason Pruim wrote:
Thanks everyone for your suggestions, it turns out it was a unix time
stamp and I can get it to parse out a normal date now.
Now... on to the harder part
What I am trying to do is learn... This is kind of just a pet project
for me to figure out how I can do it. here
Roberto Mansfield wrote:
Jason Pruim wrote:
Thanks everyone for your suggestions, it turns out it was a unix time
stamp and I can get it to parse out a normal date now.
Now... on to the harder part
What I am trying to do is learn... This is kind of just a pet project
for me to figure out
Jason Pruim wrote:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database. It's
a timecard system that I have found on-line and I am attempting to
figure out how to write a script that would give me everyones timecard
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database.
It's a timecard system that I have found on-line and I am attempting
to figure out how to write a script that would give me everyones
timecard for the month on
Jason Pruim wrote:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database.
It's a timecard system that I have found on-line and I am attempting
to figure out how to write a script that would give me everyones
timecard
Jason Pruim wrote:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database.
It's a timecard system that I have found on-line and I am attempting
to figure out how to write a script that would give me everyones
2007. 03. 28, szerda keltezéssel 15.35-kor Jason Pruim ezt írta:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database.
It's a timecard system that I have found on-line and I am attempting
to figure out how to
Zoltán Németh wrote:
2007. 03. 28, szerda keltezéssel 15.35-kor Jason Pruim ezt írta:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database.
It's a timecard system that I have found on-line and I am attempting
to
Jason wrote:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database.
It's a timecard system that I have found on-line and I am attempting
to figure out how to write a script that would give me everyones
timecard
2007. 03. 28, szerda keltezéssel 14.48-kor Travis Doherty ezt írta:
Zoltán Németh wrote:
2007. 03. 28, szerda keltezéssel 15.35-kor Jason Pruim ezt írta:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a
I'd agree with what Richard is alluding to: turn your two dates into
timestamps, and then compare those. mktime() or strtotime() should
help you out.
HTH,
John W
On 4/18/06, Richard Lynch [EMAIL PROTECTED] wrote:
http://php.net/mktime may be more suitable, depending on the date
range of the
Hi everyone,
this is the function I have written for comparing a date time please tell me
if my logic is correct ? and if there's a better alternative please let me
know of that as well.
// This function will return 1 if supplied date is expired
function is_expire($expiry_date){
http://php.net/mktime may be more suitable, depending on the date
range of the input.
That said, as far as I can tell, your $formated_expiry_date is the
SAME as your $expiry_date, except possibly for some separation
characters.
If the separation characters are ALWAYS the same, you could just do:
[EMAIL PROTECTED] wrote:
Having a heck of time getting anything to work, can anyone make a suggestion
to the following.
I need a webpage that displays 5 recurring meeting dates, i.e. the second
Wednesday, Thursday, and Friday of each month in five different locations.
?php
echo Current
,
Burhan
[EMAIL PROTECTED]
-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED]
Sent: Sunday, September 11, 2005 6:55 AM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] Date/Time Display for recurring monthly event
[EMAIL PROTECTED] wrote:
Having
Having a heck of time getting anything to work, can anyone make a suggestion
to the following.
I need a webpage that displays 5 recurring meeting dates, i.e. the second
Wednesday, Thursday, and Friday of each month in five different locations.
Is there an easy (meaning code only, without using a
Hey,
I thought this would be simple and just a few mins of programming but along
the way...i have managed to confuse myself ;-D
I have 2 field in my table users_online:
present_date_time datetime
expires_in datetime
for present_date_time I am using now() to insert
but for expires_in I need to
On Apr 9, 2005 12:35 PM, Ryan A [EMAIL PROTECTED] wrote:
Hey,
I thought this would be simple and just a few mins of programming but along
the way...i have managed to confuse myself ;-D
I have 2 field in my table users_online:
present_date_time datetime
expires_in datetime
for
On 4/9/2005 7:28:34 PM, Greg Donald ([EMAIL PROTECTED]) wrote:
On Apr 9, 2005 12:35 PM, Ryan A [EMAIL PROTECTED] wrote:
Hey,
I thought this would be simple and just a few mins of programming but
along
the way...i have managed to confuse myself ;-D
I have 2 field in my table
Well, I got the time displaying sort of right but have a length problem. See, using %T
doesn't work in date() but %Z does but it returns a very long string 'Mountain
Daylight Time' when all I want is 'MDT'. Is there a way around this problem other than
having to edit the string date() returns??
echo(date('T'));
Works fine for me.
On Fri, 2003-06-27 at 13:03, Sparky Kopetzky wrote:
Well, I got the time displaying sort of right but have a length problem. See, using
%T doesn't work in date() but %Z does but it returns a very long string 'Mountain
Daylight Time' when all I want is
Opps! I meant strftime() as I have to pass timestamp from a file.
Sparky
- Original Message -
From: Adam Voigt [EMAIL PROTECTED]
To: Sparky Kopetzky [EMAIL PROTECTED]
Cc: PHP General [EMAIL PROTECTED]
Sent: Friday, June 27, 2003 11:07
Subject: Re: [PHP] Date/Time problem
echo(date('T
Hello Everyone,
My php/mysql application needs to keep track of the first time that a
User logs on to the site. Afterwards the User should be allowed either
3 days / 3 months/1 year of access to the site. Once the stipulated
time period is over the system should invalidate the login of the
It sounds like you're asking for triggers, which are available yet. But
you could setup a cron job to run every night to update the database. It
would be no different than doing a nightly dump for backup. You could
even have it email you the accounts that were closed and those that will
be
I assume you talking about a logged in, validated user -- because there's no
way to prevent a user from deleting their cookies, or changing their IP, or
using a different computer to access the site.
My only suggestion is that you create a user/pass login system, maintain it
with sessions, and
On 21-Sep-2002 Patrick wrote:
Hi,,
my server is located in the US and i live in Sweden, so when i try to run
the following command i get a 8hour diffrence,, anyone got any idea of how
to solve this?
date(Y-m-j)
putenv('TZ=Europe/Stockholm');
mktime(0,0,0,1,1,1970);
echo
Hi,,
my server is located in the US and i live in Sweden, so when i try to run
the following command i get a 8hour diffrence,, anyone got any idea of how
to solve this?
date(Y-m-j)
regards
Patrick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi,
Saturday, September 21, 2002, 12:30:48 PM, you wrote:
P Hi,,
P my server is located in the US and i live in Sweden, so when i try to run
P the following command i get a 8hour diffrence,, anyone got any idea of how
P to solve this?
P date(Y-m-j)
P regards
P Patrick
A quick fix that
You have to add (or subtract) 28800 seconds to/from current time and use this
as the 2nd input to date.
echo date(Y-m-j, strtotime(now) + 28800);
Sascha
Hi,,
my server is located in the US and i live in Sweden, so when i try to run
the following command i get a 8hour diffrence,, anyone
OK, give up.. been trying to compare dates in the format;
2002-05-23 12:19:34
I just cant workout how to compare, I've converted to a timestamp - but
the resulting timestamp was wrong.
Any help much appreciated...
TIA...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 23, 2002 7:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Date/Time...
OK, give up.. been trying to compare dates in the format;
2002-05-23 12:19:34
I just cant workout how to compare, I've converted to a timestamp -
but
the resulting timestamp
elapsed: $dayspassed;
any ideas? on-top of what you mentioned?
-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2002 1:18 PM
To: Brian McGarvie; [EMAIL PROTECTED]
Subject: RE: [PHP] Date/Time...
What are you trying to do? Compare dates from where
() - INTERVAL $X DAY;
Easy, eh?
---John Holmes...
- Original Message -
From: Brian McGarvie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 23, 2002 8:27 AM
Subject: RE: [PHP] Date/Time...
I have an audit table which stores events like faile logins etc
Hey guys,
I'm running a RH7.2 box with apache 1.3.20 installed and php-4.1.1
installed as a DSO.
Everything is working fine, except that the output from any date() or
time() references is 16 hours behind the system time (and hwtime) on the
machine.
The machine gets its time from an ntp server
Hey Anth,
Hey guys,
=some of the better-looking amongst us are not guys (and then some of us are...)
I'm running a RH7.2 box with apache 1.3.20 installed and php-4.1.1
installed as a DSO.
Everything is working fine, except that the output from any date() or
time() references is 16 hours
On Tue, 5 Feb 2002, DL Neil wrote:
Hello DL,
=some of the better-looking amongst us are not guys (and then some of us are...)
Sorry! :)
Check out the meaning of EST.
Sixteen hours behind NSW, Australian time would make it New York time wouldn't it?
*trumpet fanfare*
Thanks for that.
Hello Torkil,
I have a field in my mysql database containing datetime on the format
-MM-DD HH:MM:SS (24-hour format)
Now. I want to output this as follows: DD.MM.YY at HH:MM:SS
Currently I do this by this function:
function convert_datetime($in){
$return = substr($in,8,2) . . .
Hello...
I have a field in my mysql database containing datetime on the format
-MM-DD HH:MM:SS (24-hour format)
Now. I want to output this as follows: DD.MM.YY at HH:MM:SS
Currently I do this by this function:
function convert_datetime($in){
$return = substr($in,8,2) . . .
;
$query=select DATE_FORMAT(date_field, '$date_format_long' ) as fmt_date
from your_table;
RTM at http://www.mysql.com Chapter 6
- Original Message -
From: Torkil Johnsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 7:29 PM
Subject: [PHP] Date time
Hello
I want to put, into a footer include file, the last modified date of the
current
file being viewed. I have the following code that works when I hard code
the
file name -
?
$dt=date(D, F d, Y g:i:s A, filemtime(index.php));
echo $dt;
?
But of course that won't work as a footer for a site with
To: [EMAIL PROTECTED]
Subject: [PHP] date/time of current page
I want to put, into a footer include file, the last modified date of the
current
file being viewed. I have the following code that works when I hard code
the
file name -
?
$dt=date(D, F d, Y g:i:s A, filemtime(index.php));
echo $dt
script language=javascript
document.write('some text ' + document.lastmodified + ' some other text.');
/script
-Original Message-
From: Jack Dempsey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 11, 2001 4:42 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] date/time
Jack Dempsey [EMAIL PROTECTED] on 09/11/2001 11:42:07 PM
Internet mail from:
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
cc:
Subject: RE: [PHP] date/time of current page
have you tried parsing out the name from $PHP_SELF?
I would think that php wouldn't care if it gets 'index.php' or (some
Michael Geier, CDM Systems Admin [EMAIL PROTECTED] on 09/11/2001
11:46:50 PM
Internet mail from:
To: Jack Dempsey [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED]
cc:
Subject: RE: [PHP] date/time of current page
script language=javascript
document.write('some text
I'm not sure what you mean, but here is what I have tried -
try this:
? echo date(m/d/y g:i:s A,
filemtime(substr($PHP_SELF,strrpos($PHP_SELF,'/')+1))) ?
jack
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Thankyou, that works fine.
--
Chip
Jack Dempsey [EMAIL PROTECTED] on 09/12/2001 12:03:20 AM
Internet mail from:
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject: RE: [PHP] date/time of current page
I'm not sure what you mean, but here is what I have tried -
try this:
? echo
Okay, I need help with this one:
I have a table with a column in the MySQL DATETIME format. (2001-07-24
13:02:02)
I need a MySQL query that will select all the entries in it made within the
last hour.
I tried this, but it is not working correctly, what am I doing wrong?
SELECT *
OK I have read many examples, old posts etc, but I am looking for a
detailed explanation as to how to do this.
First is when I write to a mysql database using the now() function, the
time stamp looks like so when I display the time back to the browser.
204:24:06 ( This should have been 12:24pm
(there are loads of examples in
the user notes).
HTH
Jon
-Original Message-
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 08 May 2001 17:28
To: php
Subject: [PHP] Date Time Formatting ??
OK I have read many examples, old posts etc, but I am looking for a
detailed explanation as to how
in
the user notes).
HTH
Jon
-Original Message-
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 08 May 2001 17:28
To: php
Subject: [PHP] Date Time Formatting ??
OK I have read many examples, old posts etc, but I am looking for a
detailed explanation as to how to do this.
First
] Date Time Formatting ??
Here is what I am trying to do, but I get the wrong date:
$t_data_array[1]=date(m/d/y,mysql_result($db_result,$db_record,'date'));
Then I simply print the value in the arraythis date instead of 05/08/01
comes
out 12/31/69
Thanks!
Jon Haworth wrote:
I think
On 08-May-01 Jack Sasportas wrote:
snip
The Goal is to have the Time stamp looking like 12:24 (military time OK)
and the date 05-08-2001 or even 05-08-01.
The MySQL db looks like so:
date -00-00
time 00:00:00
I don't seem to really be able to vary the DB format.
Hello,
Is it possible to do some arithmetic with time/date values in PHP?
for example, to calculate:
today + 1050 days.
today - 7 days.
etc.
I mean, does PHP have functions to perform these operations?
Thanks,
Erich Reimberg.
PS. I'm new to PHP, and I didn't find anything like
Is it possible to do some arithmetic with time/date values in PHP?
for example, to calculate:
today + 1050 days.
today - 7 days.
etc.
I mean, does PHP have functions to perform these operations?
$oneDay = 86400; // number of seconds in a day
//
I'm using php 4.0.4pl1on a FreeBSD system.
When I use a php date/time function, it reports the time in GMT, however, I
have the date on my FreeBSD system set to EDT.
I can't figure out what the problem is here. The only thing I can think of
is that when I compiled php, my system timezone was set
IL PROTECTED] [EMAIL PROTECTED]
Date: April 9, 2001 12:00 AM
Subject: [PHP] date/time in wrong zone
I'm using php 4.0.4pl1on a FreeBSD system.
When I use a php date/time function, it reports the time in GMT, however, I
have the date on my FreeBSD system set to EDT.
I can't figure out what the problem is h
Ok, I have looked at all my sources, including the manual and I cannot find
any method of converting the Unix timestamp to a displayable date/time. I
have probably just overlooked it each time, but all I can find are methods
to convert the current date/time to a Unix timestamp.
Can anyone
CDitty [[EMAIL PROTECTED]] wrote:
Ok, I have looked at all my sources, including the manual and I cannot find
any method of converting the Unix timestamp to a displayable date/time. I
have probably just overlooked it each time, but all I can find are methods
to convert the current
On Fri, 19 Jan 2001, Jamie wrote:
I'm fairly new to SQL and PHP and I'm haveing trouble useing the Date
functions of Both Systems, so I'd be greatfull if someone can help.
What I'm trying to do is have an 'administrator' be able to enter info
through a form to a mySQL database. Then on a
Also I'd like to if possible to be able to enter and display the date in
Australian / European Time format (DD,MM,)
I'm currently entering it on the form using three text fields and then
rearanging them to the Format in mySQL and indserting it as a string, but
I
don't know how to 'break'
82 matches
Mail list logo