php - adding two times(time() + seconds) -


I want to add X seconds to the present time


So it should be Current_time () + $ x
and dd-mm-YYYY hh: mm: ss

is formatted as to ?

Better (and less), my method (suggested by):

  $ currentDate = date ('DMYH: I:' ', (time ()); $ Transfered date = date ('D-M-YH: I: S', (time (+ 5922725));   

My answer:

You get the mktime () function and date () Function

Example: $ currentTime = mktime (date ("H"), date ("I"), to get you this work to be colleague Date ("s"), date ("m"), date ("d") + 1, date ("y")); $ ShiftedTime = mktime (date ("h"), date ("i"), date ("s"), + 5922725, date ("m"), date ("d") + 1, date (" )); // Change with

Note that the mktime () function returns the UNIX timestamp as a result, so you convert the actual timelines to the actual date Date: ("M"), Date ("I"), Date ("S"), Date ("M"), Date, Date> Date> "Current Time = Date ('DMI H: I: S ", MKTM (date) (" D ") +1, date (" Y ")); // Similar to transpose.

Source:




Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -

ios - Does Core Data autoupdate a many to many relationship on saving -