You aren't really supposed to use time estimations in scrum. One of the core ideas is that time estimations are at best over-specific and at worst just worthless.
You estimation story points. A story point is NOT related to time. This is often the hardest thing for people new to agile to grok. Story points combine difficulty, risk and effort into a single number. It's like t-shirt sizing (small, medium or large task) only a bit more specific.
At planning, you assign points to every story. Usually the first time out you calibrate based on older work. Something like 1=trivial story, 5 = a moderate story, 13 = a big story, 29 = a massive story. First time out, it seems arbitrary. Then you decide how many of the tasks you think you can get done, and "accept" them into the sprint. Then you code for the sprint.
At the end, you count the number of points for all the stories you actually completed. Do this over the course of multiple sprints, and you will learn your "velocity" in story points. That helps you decide how many stories you likely should accept in future sprints.
At no point in any of this process do you ever bother to see how long in hours a task took, nor do you estimate how long a task will take. On of the points of the scrum style of Agile at least is to STOP wasting time on time estimates, which are invariably wrong anyway.