#cryptoboyjr_code
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1222632005749964810
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- cryptoboyjr_code, 31 minutes ago, 29 messages
Cant figure out the correct syntax for expires at
Researching ty
Would be nice to see syntax
Having trouble converting to the appropriate date/Time needed
Looks like you want something like DateTime currentTime = DateTime.UtcNow; long unixTime = ((DateTimeOffset)currentTime).ToUnixTimeSeconds();
err yeah but its value should be Unix
I understand that
I see the Unix time but I need date too
Sorry don't knew much about Unix time
What do you mean by "I need date too"?
The Unix time does represent the date
Like you can play with https://www.epochconverter.com/ if you are unfamiliar with UNIX
And you can see how it converts
Yeah I was just grabbing an example from a StackOverflow of getting Unix
That's what I'm missing how to convert the long to date time
Convert.todatetime(long) is not working
Can you just do new DateTime(long) (https://stackoverflow.com/questions/6156168/convert-datetime-to-long-and-also-the-other-way-around/6156193#6156193)
Interesting. I'm researching.
There's something wrong
public static DateTime UnixTimestampToDateTime(double unixTime)
{
DateTime unixStart = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);
long unixTimeStampInTicks = (long)(unixTime * TimeSpan.TicksPerSecond);
return new DateTime(unixStart.Ticks + unixTimeStampInTicks, System.DateTimeKind.Utc);
}
This should work but stripe keeps failing
Doesn't like the date
Date looks fine to me
Maybe try something like ExpiresAt = DateTime.UtcNow + new TimeSpan(2, 0, 0) // Configured to expire after 2 hours
I believe so