Is the time value in transaction or block information the time it arrived at my client? Both transactions and blocks have a time field when you use Bitcoin's getblock or gettransaction methods. The API method list defines the transaction time as " time the transaction occurred".

Is this the time the transaction or block arrived at my client? Or is this time defined by the sender of the transaction or block?

I tried to encode a transaction to a raw transaction and decode it again afterwards, but the lock_time property is set to 0 when I do this.

The reason for this question is that I want to make sure that when you check all transactions twice, all new ones of the second check have a time value higher than the highest one of the first check.
Blocks have timestamps, transactions don't. The time of a block creation is known, the time of the transaction can only be guessed. Most clients use the block's time for transactions, and if they're still in the transaction mempool (not in a block) they use the time the transaction was first seen by the client.