Différence entre deux heures | | |
Bonjour,
Voila le morceau de code :
setlocale(LC_TIME, "fr" );
$Diff = strftime ("%H:%M:%S, (mktime(12,0,0,1,1,1970) -
mktime(6,0,0,1,1,1970)));
$Diff Retourne 07:00:00
et
$Diff = mktime(12,0,0,1,1,1970) - mktime(6,0,0,1,1,1970) ;
$Diff retourne 21600 ( 21600 / 6 => 6H)
Chercher L'erreur !!!!! | | | | re: Différence entre deux heures
Translated inline,
[translation][color=blue]
> Bonjour,[/color]
Hello
[color=blue]
>
> Voila le morceau de code :[/color]
Here is the peice of code
[color=blue]
>
> setlocale(LC_TIME, "fr" );
> $Diff = strftime ("%H:%M:%S, (mktime(12,0,0,1,1,1970) -
> mktime(6,0,0,1,1,1970)));
>
> $Diff Retourne 07:00:00
>
> et[/color]
and
[color=blue]
>
> $Diff = mktime(12,0,0,1,1,1970) - mktime(6,0,0,1,1,1970) ;
>
> $Diff retourne 21600 ( 21600 / 6 => 6H)[/color]
$Diff returns 21600 ( 21600 / 6 => 6H)
[color=blue]
>
> Chercher L'erreur !!!!![/color]
Find the error!!!!!
[translation]
Sims | | | | re: Différence entre deux heures
I noticed that Message-ID: <c6nts8$e6dvv$1@ID-162430.news.uni-berlin.de>
from Sims contained the following:
[color=blue]
>[translation][/color]
I understood the French. I don't understand what's causing the error.
:-}
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/ | | | | re: Différence entre deux heures
[color=blue]
>
> Voila le morceau de code :
>
> setlocale(LC_TIME, "fr" );
> $Diff = strftime ("%H:%M:%S, (mktime(12,0,0,1,1,1970) -
> mktime(6,0,0,1,1,1970)));
>
> $Diff Retourne 07:00:00
>
> et
>
> $Diff = mktime(12,0,0,1,1,1970) - mktime(6,0,0,1,1,1970) ;
>
> $Diff retourne 21600 ( 21600 / 6 => 6H)
>
> Chercher L'erreur !!!!!
>[/color]
Le premier cas te montre l'heure local, 07:00 *du soir* le 1/1/1970
Le deuxieme cas te montre le nombre d'heure entre minuit et 6 heures de
moins, (donc 7:00pm).
Sims | | | | re: Différence entre deux heures
[color=blue]
>[color=green]
> >[translation][/color]
>
> I understood the French. I don't understand what's causing the error.
> :-}[/color]
It is not an error, one displays the time at (12am - 6hrs ) = 7pm and the
second case displays the difference between (12am-6hrs)= 6hrs
One shows the hour the other the time.
Sims | | | | re: Différence entre deux heures
Thanks,
Merci a vous tous ...
"Sims" <siminfrance@hotmail.com> a écrit dans le message de
news:c6nv1v$e8fqc$1@ID-162430.news.uni-berlin.de...[color=blue]
>[color=green]
> >
> > Voila le morceau de code :
> >
> > setlocale(LC_TIME, "fr" );
> > $Diff = strftime ("%H:%M:%S, (mktime(12,0,0,1,1,1970) -
> > mktime(6,0,0,1,1,1970)));
> >
> > $Diff Retourne 07:00:00
> >
> > et
> >
> > $Diff = mktime(12,0,0,1,1,1970) - mktime(6,0,0,1,1,1970) ;
> >
> > $Diff retourne 21600 ( 21600 / 6 => 6H)
> >
> > Chercher L'erreur !!!!!
> >[/color]
>
> Le premier cas te montre l'heure local, 07:00 *du soir* le 1/1/1970
>
> Le deuxieme cas te montre le nombre d'heure entre minuit et 6 heures de
> moins, (donc 7:00pm).
>
> Sims
>
>[/color] |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,295 network members.
|