Open lock at a given date / time

  • 6 Replies
  • 1734 Views
Open lock at a given date / time
« on: December 02, 2017, 08:42:55 AM »
A function which I haven't found yet is the possibility to create a lock that opens at a given date and a given time.

It is possible to set a duration for a lock like some days or hours, but I haven't found a way to set minutes (like 05:30 hours) or a date (like 12-24-2017 06:00 pm).
There are cases where you want your lock to be opened at 06:00 in the morning, but it is hard or even impossible to start a lock that opens exactly at that time, as the smallest unit are right now hours which can be set.

Is it planned to add that feature of giving a date / time for unlocking and if so, when could it be expected to be deployed?

Best regards,
Lupo

*

Offline KevinCross

  • *****
  • 1439
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: Open lock at a given date / time
« Reply #1 on: December 02, 2017, 09:02:01 AM »
Thanks for the suggestion. I can look at this but with the current set it up wouldn't be accurate and could be hours out.

The time is taken from an online server which I then convert to a Unix timestamp and the server is based in America so is using an American time zone so there's like an 8 hour difference between that time and time here in the UK and that's a problem. It means I couldn't have the lock open at the exact time you want as I won't know what time zone you're in.

There may be something I can do to automatically find the information I need from your device but that may require extra permissions. An easier option is to maybe have an option on the settings page which asks you your time zone and then try and use that to automatically unlock the lock at the date/time you've chosen. It's got to be set up so that someone can't cheat and change the timezone to unlock 4 or 5 hours early though.

As for when it can be introduced. I probably won't be able to look at it until early next year. I've got a couple of other things I want to work on with this app in the New Year and will also be trying to release an iOS version. I'll add it to the roadmap later today.
« Last Edit: December 02, 2017, 09:06:48 AM by KevinCross »
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.

*

Offline Odirish

  • **
  • 45
  • Gender: Male
  • Let's have some fun! Fetlife: odirish
    • View Profile
Re: Open lock at a given date / time
« Reply #2 on: December 02, 2017, 01:50:30 PM »
I like this idea. Part of my lock up rules is that I am allowed to go to work with my belt off, due to my body not being used to the belt and the extremely physical nature of my job. A set time and date option would be great! This would eliminate the guessing game I have to play in the morning.
Stay locked!!! Fetlife: odirish

Re: Open lock at a given date / time
« Reply #3 on: December 03, 2017, 02:43:13 AM »
Those unix timestamps should have a unit / timezone too.
When you request the time from the server in the US - doesn't it give you information about the timezone too?
I thought that the amount of milliseconds since 1st of January 1970 is based on timezone UTC (which is Greenwich Mean Time without daylight saving).

A possible solution without requesting user data like GPS / timezone could be that when an exact date and time is given, that there is a disclaimer which states that the CET (central european time) is taken for saving the date / time.

If you then also print the actual CET time, the user can estimate himself how many hours he is away from the CET.
The best usability however would be to detect the time zone the mobile device is in and convert that to CET on the device, before storing it in the database with the remaining lock information.

*

Offline KevinCross

  • *****
  • 1439
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: Open lock at a given date / time
« Reply #4 on: December 03, 2017, 07:47:55 AM »
I could display the server CET time or view the Unix/GMT time and have the user estimate but let's make that the last option. I'll have a look to see if I can access the devices time zone or will add a drop down menu for the user to choose from.
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.

Re: Open lock at a given date / time
« Reply #5 on: December 05, 2017, 02:56:16 PM »
If you're programming in Java 8, there's a library java.time that has really good implementation for dates and formatting. It's fast replacing native Java time libraries because it offers better formatting.

Here's another resource more specifically for Android: https://developer.android.com/reference/java/util/TimeZone.html

*

Offline KevinCross

  • *****
  • 1439
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: Open lock at a given date / time
« Reply #6 on: December 05, 2017, 03:13:09 PM »
I programmed it in a small BASIC type language called AppGameKit 2 (AGK2). I may have to rewrite it again in the future in a more established and we'll known language but it was a case of if I had started it another language it would probably never have been made at all.

I wrote some code to work out the time zone you're in but haven't built on it or done any real testing to see how easy it is to cheat. The language I wrote it in doesn't have access to your time zone but comparing the device time with the server time I can work out the difference. That might be more than 12 hours if the dates are wrong on the device or you're cheating to unlock early by adjusting the date and time. And that's a reason why the app would never work offline which a couple of users have asked for.
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.