I have never seen before so funny "definitions" of a "unix timestamp" data type and a "system time" representation: ;)
unix time stamp is like = 1227806311
the same system time stamp is = 27/11/2008 HR MIN SEC
Well, try to adopt this code:
/* UnixTime is unspecified unix time stamp type.
* Define it before compilation, for example:
* typedef time_t UnixTime;
* typedef long int UnixTime;
UnixTime ut; /* Unix timestamp to be converted */
time_t thist; /* This system timestamp value */
struct tm* ptm;
char mysyst = "\?"; /* for "sys time" */
const char* fmt = "%d/%m/%Y %H %M %S"; /* sys?time */
/* C Standard does not specify what's time_t epoch */
time_t uepoch; /* Unix epoch in this system time_t */
struct tm tmepoch;
/* Prepare unix time epoch on this system */
tmepoch.tm_year = 1970 - 1900;
tmepoch.tm_mon = 1 - 1;
tmepoch.tm_mday = 1;
tmepoch.tm_hour = 0;
tmepoch.tm_min = 0;
tmepoch.tm_sec = 0;
uepoch = mktime(&tmepoch); /* this system unix epoch */
/* Recalculate unix time to this system time_t */
thist = (time_t)ut - uepoch;
ptm = gmtime(&thist);
if (ptm && strftime(mysyst,sizeof mysyst,fmt,ptm))
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...