Are you looking for my non-technical blog?

This is now my technical-only blog, my non-technical blog is here.
Showing posts with label Development. Show all posts
Showing posts with label Development. Show all posts

12 January 2006

Sqlite - Date and Time Data Types

SQLite handles dates quite strangely. If you create a table and put a date in it, the only way SQLite will take the input is "2004-06-01 12:00:00" anything else it won't recognize as a date and thus none of the date functions will work. Assuming you have a date entered propely (like above) you get date information from the db like so.
SELECT date(DateField) FROM Table; SELECT time(DateField) FROM Table; SELECT datetime(DateField) FROM Table;
If you want unix time (seconds since the epoch) you have to format the output.
SELECT strftime("%s",DateField) FROM Table;
However that will return the time in UTC which is probably not what you want (it's not what I wanted). I want it to compensate for my local timezone and thus you have to tell it to use your timezone.
SELECT strftime("%s",DateField,'localtime') FROM Table;

Related Posts:
Green Data: Pysqlite

Sources: Perturb.org , Sqlite Wiki
Tags: , ,

25 December 2005

pysqlite

SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. While pysqlite is a Python DB-API 2.0 interface for it. So in order to install pysqlite you have to have sqlite installed. But unfortunately when trying to install sqlite using apt-get it seems that some header files were missing that prevented pysqlite from being installed properly. So after installing sqlite from source, I was able to install pysqlite successfully.

Tags: , ,

23 December 2005

GMailRCS - Version 1.00

GmailRCS is a way to use your Gmail account as a lightweight Revision Control System (RCS) in order to backup and restore the different versions of your source code. The software is written in Python, using libgmail
GmailRCS: http://sourceforge.net/projects/gmailrcs/


Tags: , ,

15 December 2005

C - Hex Dump Function

Every sniffer has a hex dump function in order to print the captured packets to the user, so this is a hex dump function I made ... mycap_dump()

Tags: , ,

12 October 2005

bBlog, B Blogger.

Do you have your own web server and want to have your own blog there? Then use bBlog, it is a personal publishing system written in PHP and released as free, Open Source software under the GPL.
bBlog: http://www.bblog.com/

Tags: , , , ,