How is locktime enforced in the standard client? I am trying to study the locktime feature of transactions ( https://en.bitcoin.it/wiki/Protocol_specification#tx ). I have created some raw transactions in the testnet with different locktimes, but, when I send them, they are confirmed as usual. I have also been able to spend the just sent coins immediately. When I dump the block, the locktime field looks correct. 

How is the locktime checked when confirming a transaction? Can someone point me to the piece of the code that does the checking? 

Or am I wrong and locktime is really not implemented?
It's checked in the IsFinal() method of CTransaction. A non-final transaction cannot be included in blocks.

A transaction is final if either:


The lock time is in the past.
All of the inputs have sequence numbers equal to UINT_MAX.


The second one is probably what confused you.