Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Convertir des secondes en heure

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
ash_le_parisien
Smarty n00b


Joined: 23 Jul 2008
Posts: 3

PostPosted: Wed Jul 23, 2008 10:28 am    Post subject: Convertir des secondes en heure Reply with quote

Bonjour,

Mon script en PHP me retourne un temps en secondes, j'ai besoin de le convertir au format : "Heure : Mois : Secondes" ("%H : %M : %S"), seulement lorsque j'utilise :
Quote:
{$temps|date_format:"%H : %M : %S"}


Il me retourne l'heure actuelle...

Comment faire pour qu'il me convertisse ce que je lui donne en paramètres au format désiré ?

exemple : 113 secondes => 1 : 53
Back to top
View user's profile Send private message
arnogb69
Smarty Rookie


Joined: 07 May 2008
Posts: 11

PostPosted: Thu Jul 24, 2008 1:22 pm    Post subject: Reply with quote

Tu peux utiliser la fonction PHP date dans ton gabarit pour faire cette modification, et ensuite n'assigner que le date formatée.
Je pense que c'est plus simple

[url]http://fr.php.net/date [/url] Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP