timestamp

Best GMT time configuration by user | PHP

I was wondering how to do the best user configuration when the user sets his own GMT time, e.g. if a user was in the GMT+3 timezone and the user sets it via the UCP. What I've done was, every option in the drop-down menu: <select name="timezone"> ... <option value="-7200">GMT-2</option> <option value="-3600">GMT-1</option> ...

mysql timezone and current_timestamp

Hi, I have changed the timezone of my server per connection basis which is working fine but most of the addedon Fields in my database tables and timestamp and I am using the CURRENT_TIMESTAMP default value for them to add the inserted date. Now as I have changed the timezone but this change is not affecting the dateadded fields of m...

How to parse of EXIF time stamps with Bash script

As a bash script rookie, detailed answers would be appreciated. :) I am trying to write a bash script that parses JPEG EXIF time stamps output from the exiv2 commmandline utility, which gives me typical output like: Image timestamp : 2010:07:27 17:38:52 Is there a way to parse the time stamp so that its components, like year, mont...

Timestamping data through multiple machines - times are off?

Hi, I working on some applications that route tcp and upd traffic through multiple machines and I'm trying to timestamp (millisecond resolution) the packets on every node to receive a full picture of latency through each node. Before the tests I made sure that all windows machines are NTP synced, however my issue seems to be that the t...

Script to open newest image (latest timestamp) in XP?

Hello- I need some type of script or command that when triggered, opens up the most recent timestamped .jpg file within a specific folder ex: c:\images I will use autohotkey to call the script/command (AHK may even be able to execute for all I know) at specific intervals. Any help appreciated. Thanks! ...

mysql select timestamp as date string

Hi! I have a table with the column "create_time" which is of type 'INTEGER' and represents the time since epoch. I'd like to select all rows & columns while displaying this row as a date/time in UTC format. How do I do that? ...

Auto TimeStamp new entry to DB (phpMyAdmin)

Hi. If I want each new entry into my db to be automatically timestamped, would I set the Field Type to "timestamp" and have the Default value set to "CURRENT_TIMESTAMP"? Is this the correct method? ...

change timestamp in bind logfile

i need to change the timestamps in a bind logfile because half of them are incorrect now that i have updated the system time... every line in the file follows this format: 04-Aug-2010 07:32:31.416 client 10.0.0.1#00000: query: google.com IN A + (10.0.0.1) all the time stamps are out by 8 hours. this is what i have so far: #!/usr/bin...

Get the begining and ending unix timestamp for a given month and year in php

Hay, I want to find the timestamp for the first day in a month (say September 1 2010 and 0:00) and the last day in a month (say September 31 23:59). Any ideas how to do this? ...

MySQL: Optimizing SELECT from 6 huge identical tables with different data split up by timestamp

Hello, please I have the same problem as I found here http://stackoverflow.com/questions/409705/mysql-selecting-data-from-multiple-tables-all-with-same-structure-but-different , I have to select data from many MySQL tables with identical structure, but different data (split up into table_0, table_1, table_2 etc to table_5 to distribute...

Log4J; how to ensure timestamps are always in GMT using ConversionPattern?

How can I ensure that all timestamps that my log4j is using, are in GMT? I have tried the following but it prints "GMT" inside the timestamp log4j.appender.ConversionPattern=%d{HH\:mm\:ss,SSS}{GMT} %-4r %-5p [%t] %3x - %m%n ...

Grant User One Point Each Day

Using PHP/mySQL, a user is granted a single integer point to their member account each day. The data I will use to determine if a point should be granted are these mysql fields: Creation Date (timestamp) and Last Login (UNIX TIME). The procedure for granting these points is determined when the user logs in. My question is, what's the mo...

PhP: unix timestamp counting backwords problem.

ok well i have this error with a counter i made witch is suppost to count down to 0 $time=1283593330+(60*15); $time3= time(); $time2=$time-$time3; 1283593330=Sat, 04 Sep 2010 09:42:10 GMT Error is this: when the $time3 timestamp hit the timestamp for $time it says 05:00:00 instande of 00:00:00. This is the code i use to call it. Tim...

Rails' datetime and timestamp in a migration file are the same for MySQL and Sqlite3?

:datetime and :timestamp in a migration file seems like the same in MySQL and Sqlite3, and they both map to datetime in the database side, except I can't find that in a formal documentation. Also, what about when if our Rails project may use other DBMS, then should we use :datetime or :timestamp when we script/generate (or rails generat...

Java simple Timestamp to Date conversion

I've been trying to find the answer to this for a while today and there's just so much contradictory information.... What I'd like to do is get a current unix timestamp in android, and then convert it to a format that allows me to getHours() and getMinutes(). I'm currently doing this: int time = (int) (System.currentTimeMillis()); Tim...

Mysql time stamp queries

I have a column that uses time stamp. My question is I am a bit confused about how to make queries against it,how would I say Where $time is after X date Are queries made in local time or CUT? When I just try to do where andthe post date /time I get an error because of the space and if I quote it I think it takes it as a string : / ...

Parsing dates from jQuery UI datepicker

Hi, I am using jQuery UI datepicker to allow the user to select dates. This updates an input field in a form in the format: dd/mm/yyyy I am trying to use jQueryUI to then parse the date in a UNIX timestamp to check it is a date with the built in jQuery UI parseDate: http://docs.jquery.com/UI/Datepicker/parseDate However i am not su...

Convert DD/MM/YYYY HH:MM:SS into MySQL TIMESTAMP

I would like a simple way to find and reformat text of the format 'DD/MM/YYYY' into 'YYYY/MM/DD' to be compatible with MySQL TIMESTAMPs, in a list of text items that may or may not contain a date atall, under python. (I'm thinking RegEx?) Basically i am looking for a way to inspect a list of items and correct any timestamp formats found...

JDO not storing time information in Date, only stores the day

I am using Google App Engine with Java, JDO for persistence. I have my Activity object with timestamp declared as Persistent and of type java.util.Date. public class Activity ... { ... @Persistent private Date timestamp; ... } All Activities stored in the database are seen with correct dTate but time information is always zero. ...

Unix timestamp in sqlite?

How do you obtain the current timestamp in Sqlite? current_time, current_date, current_timestamp both return formatted dates, instead of a long. sqlite> insert into events (timestamp) values (current_timestamp); sqlite> insert into events (timestamp) values (current_date); sqlite> insert into events (timestamp) values (current_time); sq...