timestamp

Regex Subtitution in Python

I have a CSV file with several entries, and each entry has 2 unix timestamp formatted dates. I have a method called convert(), which takes in the timestamp and converts it to YYYYMMDD. Now, since I have 2 timestamps in each line, how would I replace each one with the new value? EDIT: Just to clarify, I would like to convert each occur...

retrieve the value of a timestamp field with adodb - how to read a byte array from classic asp

I'm working with asp and adodb, querying a database (ms sql 2005) I have a field named stamp, of type timestamp in asp I get the following field.ActualSize: 8 field.DefinedSize: field.Name: Stamp field.Type: adBinary (128) field.Attributes: 528 (adFldFixed (16) + adFldRowVersion (512) ) (so adFldLong is NOT turned on, so I can't u...

Timestamp Response is Incorrect - BouncyCastle

Hi, Trying to request a timestamp (RFC 3161) by using BouncyCastle and connecting to http://timestamping.edelweb.fr/service/tsp. I do get a TimestampResponse back from the server but it seems to be without an actual date. This is the code: public static void main(String[] args) { String ocspUrl = "http://timestamping.edelweb.fr/se...

Odd behavior with timeIntervalSince1970

I'm seeing an odd behavior with trying to get seconds since epoch in objective C. This: NSString *nowTimestamp = [NSString stringWithFormat:@"%d", [[NSDate date] timeIntervalSince1970]]; Outputs 15907296, when the current timestamp should be 1243555623 (05/28/2009 @ 7:08pm EST). The system time on the i...

Conditional time display

In the mailbox section of my Rails app, I simply display the timestamps of each message as follows: <%= message.created_at.utc %> But I want to change it so that if the message's date is different to today, then display the date, otherwise just display the time (e.g. like Gmail). ...

Is there an easy way to get a Unix timestamp from an SQL timestamp in php?

My database table has a column that contains SQL timestamps (eg. 2009-05-30 19:43:41). I need the Unix timestamp equivalent (an integer) in my php program. $posts = mysql_query("SELECT * FROM Posts ORDER BY Created DESC"); $array = mysql_fetch_array($posts); echo $array[Created]; Where it now echoes the SQL timestamp, I want a Unix ti...

Python: Getting file modification times with greater resolution than a second.

os.path.getmtime() and os.stat() seem to return values in whole seconds only. Is this the greatest resolution possible on either a Windows or OSX file system, or is there a way of getting greater resolution on file times? ...

Java Timestamp - How can I create a Timestamp with the date 23/09/2007?

How can I create a Timestamp with the date 23/09/2007? ...

Using HQL to query on a date while ignoring the time on Oracle

I have a table (in Oracle 9 and up) where I need to find all entries for a given day using Hibernate. The entries have timestamps (with data type 'date'). Some of the entries have a time, others only have a date. This can not be changed, as this is the output of other applications which I can not change. In SQL I would write something al...

Exact time at which an event occurred

What i want to do is record the time of when a button has been pressed. All these times will be stored in an array. The program will then run through the array and look at the time values and then highlight the button states at those particular times during playback. Hopefully this makes sense, whats the best way to do this?! Thanks in ...

ASP.NET MVC: dealing with Version field.

I have a versioned model: public class VersionedModel { public Binary Version { get; set; } } Rendered using <%= Html.Hidden("Version") %> it gives: <input id="Version" name="Version" type="hidden" value="&quot;AQID&quot;" /> that looks a bit strange. Any way, when the form submitted, the Version field is always null. publi...

String representation of time_t?

time_t seconds; time(&seconds); cout << seconds << endl; This gives me a timestamp. How can I get that epoch date into a string? std::string s = seconds; does not work Thanks, Noah P.S. It's really much easier in ruby!: >> Time.now.to_i.to_s => "1245089994" ...

how to convert datetime to unix timestamp in c?

the scenario is: I get datetime in format "YYYY-MM-DD HH:MM:SS" with libexif. To minimize the saving cost, I wanna convert the datetime to unix timestamp or alike which only cost 64bit or 32bit. Is there any explicit way with c? ...

Workaround for MySQL limited TIMESTAMP range?

Does anyone know of a workaround for storing values outside of the range '1970-01-01 00:00:01' UTC to '2038-01-09 03:14:07' UTC in a MySQL TIMESTAMP field? ...

Calculating a date

I need to make a timestamp to put into MySQL. The user is submitting a number (of weeks) I need to add that many weeks to today's date. What I am trying to do is calculate an end date of an ad that the user is submitting. Any suggestions on how to do this? Thanks! ...

How to store datetime in database if time portion is optional?

Should I store it in a single timestamp/datetime field or separate date and time fields? I prefer to store it as a single timestamp field but I need to know when a user didn't enter a time portion. How to best store this in the database? I'm using postgresql. Thanks. ...

what is the difference betwen timestamp in java and php?

Hello, I have a java file that write records to the DB and time stamps I have another php file that reads that records.. unfortunately After converting the time stamp to dates I got a wrong dates ?? what is the problem !!! ...

Time triggered job Cron or Quartz?

I already asked a separate question on how to create time triggered event in Java: http://stackoverflow.com/questions/1029164/large-scale-time-triggered-event-handling. I was introduced of Quartz. At the same time, I also google it online, and ppl are saying Cron command in Unix is a neat solution. Which one is better? What's the cons ...

PHP Time and Date

I have a database with dated articles. What I want to do is select articles between 2 dates - for example from 7 days ago to today. Can anybody help me. I have been trying to write a code for it but it hasn't worked for me. Thanks in advance ...

nested jobs in Quartz

I have nested task to schedule: (1). A daily master task downloading scheduling information, which is a List of job names with timestamps (2). schedule the job in the scheduling information I just downloaded according to its timestamp I am not sure how the nested jobs work in Quartz. It seems that I need a CronTrigger triggering a job,...