timestamp

Subversion - Timestamp changes, but content does not

Hello there, I think this is hard to describe, but I will try: We're using Subversion an Buildtools. When we make a Build from our Project, several files will be overwritten, of course. So the timestamp of these files changes, but the content might be the same as before. An svn diff will display the following for exanple: - test.tx...

Time stamp and adding 1 year and last day in month

I have timestamp in DB like: 1268085720, its 2010-03-08 23:00, so its today. How can i add one year, and to be the last day in the same month, and need to convert it like: YYYY-MM-DD HH:MM? For given example i need 2011-03-31 23:59. Thanks ...

Android Convert Central Time to Local Time

I have a MySql database that stores a timestamp for each record I insert. I pull that timestamp into my Android application as a string. My database is located on a server that has a TimeZone of CST. I want to convert that CST timestamp to the Android device's local time. Can someone help with this? ...

Calculate time elapsed from log timestamps using Ruby

I am parsing a log and would like an elegant way of calculating the difference between these time stamps shown below: [Mar 2, 2010 1:54:40 AM] [Mar 4, 2010 10:54:40 PM] I've looked at DateTime however I wasnt sure if it was ncessary to seperate the Date from the actual time part and create a Time object. If there is an easier way plea...

Parsing javascript date string to timestamp. the tz info is in the date!

I have to parse a javascript date string to a timestamp. If the date string has the TZ info, why do I have to supply a TZ object in the DateTime constructor and again with setTimezone()? Is there an easier way to do this that is aware of the TZ info in the date? $s = 'Thu Mar 11 2010 13:00:00 GMT-0500 (EST)'; $dt_obj = new DateTime($s, ...

last_update timestamp for every table?

Is it a good practice to have timestamps for the last row update in every table? Or should they only be set where really needed? How do I know where I will need an update timestamp later? For which kind of information do they make sense? ...

How can I convert a php timestamp to the same format as new Date() in javaScript?

I have a time stamp I created with PHP that I would like to convert to the same format as new Date() in javaScript. Here's my code: $current_timestamp = time(); //This returns a value such as 1268214657 I need to create a string using that timestamp that looks like this: Fri Mar 12 2010 01:50:33 GMT-0800 (Pacific Standard Time). ...

Is there a library in Python that can convert user-dates to timestamp?

If the month is: "12" Day is: "05" Year is: "2010" Can this be converted into a timestamp somehow, in a very simple way? ...

How to convert a unix timestamp to an ISO8601 timestamp in PHP?

I am trying to extract unix timestamp from mysql and convert it to ISO8601 timestamp. I need it in order to format date into facebook-like(or stack-overflow-like:) '30 minutes ago' instead of displaying the exact date and time. Has anyone dealt with it? ...

How can I sort timestamps in Perl?

I have several thousand objects with a string property in the format of "yyyy-MM-ddTHH:mm:ssZ". I want to sort these objects by time. Are there any useful packages or scripts for this? (Currently I'm just comparing individual numeric values and it seems it's not very efficient and neat.) ...

is it possible to display video information from an rtsp stream in an android app UI

I have managed to get a working video player that can stream rtsp links, however im not sure how to display the videos current time position in the UI, i have used the getDuration and getCurrentPosition calls, stored this information in a string and tried to display it in the UI but it doesnt seem to work in main.xml: TextView andro...

Determining whether a month contains entries

I have a list of timestamped logs and I'd like a query to return 12 booleans say whether a certain month contains any logs, for each month of the year (starting from January), i.e.: (True, False, False, True, False ..., True) I currently have the following query, which will show me all months containing data: SELECT DISTINCT(EXTRACT(...

Timezone conversion in php

can anyone suggest an easy method to convert date and time to different timezones in php ...

how to append timestamp to file name for java.util.logging.FileHandler.pattern

Hi I was wondering if anyone knows a way to append a timestamp to the log file name specified through logging.properties java.util.logging.FileHandler.pattern seems like something pretty straight forward but I cant seem to find a solution to this anywhere. Thanks ...

Get the timestamp of exactly one week ago in PHP?

I need to calculate the timestamp of exactly 7 days ago using PHP, so if it's currently March 25th at 7:30pm, it would return the timestamp for March 18th at 7:30pm. Should I just subtract 604800 seconds from the current timestamp, or is there a better method? ...

How to send a Timestamp field to Oracle stored proc. from Java despite the DB config?

I'm making a request from a java webapp to an Oracle' stored procedure which happens to have a Timestamp IN parameter. The way info travels is something like: javaWebApp --} webservice client --} ws --} storedProcedure And I send the Timestamp param as a formatted string from the webservice client to the ws. In the testing environmen...

LINQ to group objects according to timestamp

I have a serial of object defined as: public class Foo { public DateTime Time {get;set;} } now I want to group objects(IEnumerable<Foo>) according to the time, e.g. I want to group them according to hour or day or month. for example (group into hour): group 1(13:00-14:00) : foo1, foo2, foo3 group 2(14:00-15:00): foo4, foo...

How do I add 24 hours to a unix timestamp in php?

I would like to add 24 hours to the timestamp for now. How do I find the unix timestamp number for 24 hours so I can add it to the timestamp for right now? I also would like to know how to add 48 hours or multiple days to the current timestamp. How can I go best about doing this? ...

how to get timestamp with time zone in java

Hi All, I have a field in timestamp with time zone in oracle, and i need to set the value to a session variable in java. So if you have any idea related to it. Please Share with me.. Field in oracle : START_DATE TIMESTAMP(9) WITH TIME ZONE Field required to get in the result set and set to value object : sampleVO.setStartDate(rs.getT...

Show last 4 table entries mysql php

I have a movie database Kind of like a blog and I want to display the last 4 created entries. I have a column in my table for timestamp called 'dateadded'. Using this code how would I only display the 4 most recent entries to table <?php //connect to database mysql_connect($mysql_hostname,$mysql_user,$mysql_password); @mysql_select_db($...