time

Get time zone or local time from cell tower (GPRS)

I have been asked to set the system time of a Windows Mobile 6.0 handheld to the "local time." The local time in this case means the current time of the time zone the handheld is physically located in. Is there a way to request the local time from the GPRS cell tower? ...

Get current time crossplatform in c++

Hello, How can I get current time (I need hours, minutes, seconds) crossplatform in c++? I saw here make structure of values but there are a lots of another stuff that I don't need. And memory is very important here. ...

javascript unixtime one minute in front

Hi I'm passing a unixtimestamp to a javascript IF statement, can anyone tell me how to generate a unixtimestamp one minute in the future with javascript. Anyhelp would be helpful. Thanks ...

DH Keypair generation time on Android

This is the code that I'm using to generate a DH keypair: KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DH"); keyGen.initialize(1024, new SecureRandom()); KeyPair ackp = keyGen.generateKeyPair(); (without the needed try/catch, of course). I've done some tests running such code iteratively and varying the key size (in partic...

is there any php functino to format time (not date)??

Hello, I have a mysql table field set as time type which stores data in the HH:mm:ss format. So when I list the data, it prints as, for example, 16:30:00. But I want to display hh:mm part only (not the seconds). In case of datetime types, I can do date('H:i', '2010-03-16 16:30:00'). I mean I can retrieve any part. I wonder if there is ...

select time (HH:MM:SS.mmm) in javascript

I would like the user to select the time in javascript and to avoid selecting the wrong time. How should i do it? Is there some kind of javascript or jquery widget? or should i show the format and allow users to write it in (and i guess check it with regex)? i think these should be valid 1 (1s) 1:5 (1m 5s) 1.5 (1s, 500 millisecond...

PHP time math calculations

Hallo, How can I calculate a current time moment + exactly one week? The same with month. Thanks. ...

PHP Round Minute to nearest Quarter Hour

I need to round times down to the nearest quarter hour in PHP. The times are being pulled from a MySQL database from a datetime column and formatted like 2010-03-18 10:50:00. Example: 10:50 needs to be 10:45 1:12 needs to be 1:00 3:28 needs to be 3:15 etc. I'm assuming floor() is involved but not sure how to go about it. Thanks ...

GetLastInputInfo equivalent in Linux to detect last input time

Is there a GetLastInputInfo() equivalent that can be used in Linux? The intention is to detect the last input time (keyboard or mouse) of the user. Am using python to script the program. ...

Best practices for storing & selecting time/date with php & mysql?

I often find myself storing data in a mysql database, and then wanting to display all sorts of stats about my data, specifically stuff like 'how many rows do I have for this date, or that date'. Does anyone know of (or could write) a good tutorial on this subject? Ideally a good tutorial would overview: Best practices when storing th...

get local time with boost

Hi guys, I didn't find this in documentation: how to get local time (better formatted) with boost? ...

interval overlapping in tsql

hi folks, i need to get splited intervals and the number of overlapping intervals, eg basedata: interval A: startTime 08:00, endTime 12:00 interval B: startTime 09:00, endTime 12:00 interval C: startTime 12:00, endTime 16:00 interval D: startTime 13:00, endTime 14:00 now i have a separate interval from 10:00 to 15:00 and have to de...

MySQL - Calculate the net time difference between two date-times while excluding breaks?

In a MySQL query I am using the timediff/time_to_sec functions to calculate the total minutes between two date-times. For example: 2010-03-23 10:00:00 - 2010-03-23 08:00:00 = 120 minutes What I would like to do is exclude any breaks that occur during the selected time range. For example: 2010-03-23 10:00:00 - 2010-03-23 08:00:00 - ...

How to display locale sensitive time format without seconds in python

I can output a locale sensitive time format using strftime('%X'), but this always includes seconds. How might I display this time format without seconds? >>> import locale >>> import datetime >>> locale.setlocale(locale.LC_ALL, 'en_IE.utf-8') 'en_IE.utf-8' >>> print datetime.datetime.now().strftime('%X') 12:22:43 >>> locale.setlocale(l...

how to make my java app get global time from some online clock

I am making a distributed java app for which I need both parts of the app to run on one standard time. Since system times can be different I was thinking if java API contains some class to download time from a standard online source? ...

Is this the correct way to convert a UTC datetime string into localtime?

Is this the correct way to convert a UTC string into local time allowing for daylight savings? It looks ok to me but you never know :) import time UTC_STRING = "2010-03-25 02:00:00" stamp = time.mktime(time.strptime(UTC_STRING,"%Y-%m-%d %H:%M:%S")) stamp -= time.timezone now = time.localtime() if now[8] == 1: stamp += 60*60 elif n...

problem in loading images from web

hi, I am new in android and had developed an app which get images from the website and display it. I got it working in emulator but not in real phones. In some device, it will crash or take very long loading period. Can anyone please help me or guide me in improving it as i'm not sure whether the way i loads the images is correct or not...

Check whether the string is a unix timestamp

I have a string and I need to find out whether it is a unix timestamp or not, how can I do that effectively? I found this thread via Google, but it doesn't come up with a very solid answer, I'm afraid. (And yes, I cribbed the question from the original poster on the aforementioned thread). ...

Difference between dates

I want to calculate the difference between two times, one of which is the current time, and the other is just in the format HH:MM, always in the future. If I just subtract $futuretime from $now, it should, of course, be a positive number. This works fine until... If $now is in the afternoon or evening and $futuretime is, say, 7AM next...

Flash - current time plus 30 minutes

hey all, im really new to flash, how do i go about creating a variable which will get the current date and time and add 30 minutes to it ? thanks ...