Is my pseudo-random initialization vector secure? How can I know if I am generating a secure pseudorandom initialization vector?

Currently I am planning to generate a pseudo-random initialization Vector using current date and time - is this secure enough?

If the answer depends on the block cipher and mode of operation, I am using OFB mode with AES.
Just use the build in crypto PRNG of your operating system or framework.


C# / .net: RNGCryptoServiceProvider Class
Java: SecureRandom Class
Linux: /dev/urandom
Win32 API: CryptGenRandom function


date/time might be enough for modes which only require uniqueness, but if you generate two IVs in quick succession(within 16ms or so) or if the clock is changed. It's still an unnecessary risk.

date/time is certainly not enough for modes where an unpredictable IV is required, such as some uses of CBC.