c# - Create a time Offset from string with NodaTime -


i have string represents offset of particular customer. example utc+1:00. offset relative utc, string start utc followed + or - , offset in format hh:mm.

the question is, how can take string , convert offset? not want date , time object offset applied, want object symbolizes offset, can later apply date, different altogether.

at title says, i'm looking use nodatime this.

it sounds want:

var pattern = offsetpattern.createwithinvariantculture("'utc'+h:mm"); var offset = pattern.parse(text).value; 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -