time

Why aren't my MySQL Group By Hours vs Half Hours files Not displaying same data?

I need to be able to display data that I have in 15 minute increments in different display types. I have two queries that are giving me trouble. One shows data by half an hour, the other shows data by hour. The only issue is that the data totals change between queries. It's not counting the data that happens between the time frames,...

How to speed up/slow down application's 'time'

I guess I am not saying it right in the title. What I intend to do is to hook to some system api,like a time interrupt happens every amount of time (which is how every application in the operating system interprets time) and make an application's call to this api return some bigger/smaller result. So from the point view of an applicaiton...

PHP Call Time Pass Reference

What is Call Time Pass Reference? What does it do? ...

how to store "2010-03-26 10:13:04 Etc/GMT" mysql?

Hi All, I would like to store "2010-03-26 10:13:04 Etc/GMT" value in column of type datetime. when i try to insert it i got exception SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10:13:04 Etc/GMT', at line 1 how to insert data tim...

Java loop for a certain duration

Hi, Is there a way I can do a for loop for a certain amount of time easily? (without measuring the time ourselves using System.currentTimeMillis() ?) I.e. I want to do something like this in Java: int x = 0; for( 2 minutes ) { System.out.println(x++); } Thanks ...

Why is it that I cannot insert this into Django correctly?

new_thing = MyTable(last_updated=datetime.datetime.now()) new_thing.save() >>>>select * from MyTable\G; last_updated: 2010-04-01 05:26:21 However, in my Python console...this is what it says... >>> print datetime.datetime.now() 2010-04-01 10:26:21.643041 So obviously it's off by 5 hours. By the way, the database uses "SYSTEM" as it...

Remove files created between certain time stamps.

Last night I had a script go a bit crazy and create a bunch of directories between 3:00 and 3:09am. Is there a quick one liner that will hunt these down and remove them for me? ...

mpmovieplayercontroller sometimes has slow load time, what can be the reason? (iPhone)

mpmovieplayercontroller sometimes has slow load time, what can be the reason? thanks ...

Is it possible for computers to tell time without a built in clock?

Computers keep time normally with a built in clock on the motherboard. But out of curiosity, can a computer determine when a certain interval of time has passed? I would think not as a computer can only execute instructions. Of course, you could rely on the computer knowing its own processing speed, but that would be an extremely crude ...

Measuring the time to create and destroy a simple object

From Effective Java 2nd Edition Item 7: Avoid Finalizers "Oh, and one more thing: there is a severe performance penalty for using finalizers. On my machine, the time to create and destroy a simple object is about 5.6 ns. Adding a finalizer increases the time to 2,400 ns. In other words, it is about 430 times slower to create and destroy...

How to use PHP Time function to set a time variable of '09:30', add a specific amount of seconds and then echo the new time.

Hi guys, hopefully you can help me here. I have some code (please see below) which takes the current time, then adds specific seconds to the time and re-displays the time 1 minute in the future. Instead of the time being the current time, I want it to be a time which I set - say 9:30. Then I want to be able to add, for example 65 second...

Checking the time in Objective-c?

how can I get the current time in hh:mm format? I need to be able to tell between AM and PM and compare between the current time and a second time as well. I'm sure it's a silly function but i can't seem to figure it out. ...

strftime doesnt display year correctly

Hi guys, i have the following code below: const char* timeformat = "%Y-%m-%d %H:%M:%S"; const int timelength = 20; char timecstring[timelength]; strftime(timecstring, timelength, timeformat, currentstruct); cout << "timecstring is: " << timecstring << "\n"; currentstruct is a tm*. The cout is giving me the date in the correct forma...

Group MySQL Data into Arbitrarily Sized Time Buckets

How do I count the number of records in a MySQL table based on a timestamp column per unit of time where the unit of time is arbitrary? Specifically, I want to count how many record's timestamps fell into 15 minute buckets during a given interval. I understand how to do this in buckets of 1 second, 1 minute, 1 hour, 1 day etc. using My...

How to convert "9:00 PM EST" to a Date object

I am developing an Android application and require some basic datetime manipulation. I have a Date object (from Java.util.Date) holding a specific date. I need to add a specific time to it. The time I have is a string in this format: "9:00 PM EST" How would I "add" this time to the previous date? If the Date object currently has: "4/24/...

Can I Force A ASP.Net Website to Show Time in A Specific Time Zone?

I have a client request that all times be displayed in Pacific Time Zone, regardless of client settings. I'd like to avoid a scenario where I have to call a function for every time display and instead have a single point where I can make the switch. I'm thinking a custom culture might do the trick, but I wanted to ask before I set off d...

Elapsed time of running a C program

Hi, I would like to know what lines of C code to add to a program so that it tells me the total time that the program takes to run. I guess there should be counter initialization near the beginning of main and one after the main function ends. Is the right header clock.h? Thanks a lot... Update I have a Win Xp machine. Is it just addin...

UTC Time on Google App engine ?

What's the best way to work out the time when my servlet in google app engine is hit ? if I call System.currentTimeMillis() and store that info will it be reliable ? I don't need milliseconds precision. I just want to store an entity with the date on when it arrives. Thanks ...

How do I.. get a value for time at 9:00am local, regardless of the timezone?

In my app, I need to set a variable for a start time to be 9:00 a.m. local, wherever the user is located. I have a timezone variable for each user and the save and retrieve are all working. But I need to set a variable when I create a new event to be 9:00 am in the user's local time zone. My current method uses the local time of the s...

How to get the time separator symbol in Java?

Is there a way to get the time separator symbol ':' in Java? Is it a constant somewhere or a getter? Maybe there is something equivalent to the File.separator? My time string is returned by DateFormat.getTimeInstance(DateFormat.SHORT, locale).format(date); Is it safe to just use ':' in this case when later somebody wants to parse this...