473,508 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need Help in Calculating Unix Start time and End time.

1 New Member
Hello dear friends,

i needed a help in php...suppose a user buys a service on my site and that service is for 30 days, so i just wanted to know that how to calculate expiration time (unix) from the date they purchased service...plz explain with example code...

thanx
Nov 2 '11 #1
1 1712
johny10151981
1,059 Top Contributor
use mktime function to create unix time

and finally subtract two times, dived them with (60*60*24). you will get day difference
Nov 3 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
2941
by: Bart Nessux | last post by:
am I doing this wrong: print (time.time() / 60) / 60 #time.time has been running for many hours if time.time() was (21600/60) then that would equal 360/60 which would be 6, but I'm not getting...
8
1496
by: kwharrigan | last post by:
I am working on some code using python and a distributed system. Some particular message is sent on one machine (with a timestamp logged) and after the message is received, a timestamp is made. I...
8
3392
by: peterbe | last post by:
What's the difference between time.clock() and time.time() (and please don't say clock() is the CPU clock and time() is the actual time because that doesn't help me at all :) I'm trying to...
1
1624
by: rija | last post by:
Hi folks, I need help regarding date and time comparison in PHP and MySQL My website is hosted in the USA (GMT - 8) And It is managed in Madagascar (GMT + 3) Want to consider DATE in Madagascar...
8
1457
by: flamesrock | last post by:
So, I was blazin' some mad chronix, as they say, and got on to thinking about Python. The question was, is the statement: time.time() < time.time() always true? Seems it should be false,...
9
8283
by: Ron Adam | last post by:
I'm having some cross platform issues with timing loops. It seems time.time is better for some computers/platforms and time.clock others, but it's not always clear which, so I came up with the...
1
319
by: Nitro | last post by:
Hello, today I encountered a very odd situation. I am on Windows Vista and using Python 2.5.2. Here's a code snippet to illustrate my problem: # uncomment the next line to trigger the...
5
2912
by: Nickolai Leschov | last post by:
Hello, I'm reading code for time function in glibc and I see the following fragment in file time\time.h: /* Return the time now, and store it in *TIMER if not NULL. */ time_t time (timer)...
1
7818
by: dviry | last post by:
hello , i need to do some things with windows system time . the problem is that i need to change windows system time - and i dont know how to change it . datetime.new - can't get any...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.