Reputation: 2771
How would I convert a user given time, using the time picker would be fine, into UNIX time assuming the user inputted a time in the same time zone that they are currently in?
Upvotes: 0
Views: 674
Reputation: 2473
You should use Calendar to convert values provided by the user to valid Unix timestamps
Calendar cal = Calendar.getInstance(); cal.set(2011, 9, 3); cal.getTimeInMillis();
Upvotes: 1