I know how to pass the current Unix time from the frontend:
web3.js:
anchor.web3.SYSVAR_CLOCK_PUBKEY
Rust:
let current_time = ctx.accounts.clock.unix_timestamp;
I do not want that. I need the smart contract itself to get the current time.
I'm assuming you're using anchor
let now_ts = Clock::get().unwrap().unix_timestamp;
You will need to pass in the system program account